Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check Bubble db diagram for network application #982

Closed
sync-by-unito bot opened this issue Oct 26, 2021 · 6 comments
Closed

Check Bubble db diagram for network application #982

sync-by-unito bot opened this issue Oct 26, 2021 · 6 comments
Assignees

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented Oct 26, 2021

┆Issue is synchronized with this Asana task by Unito
┆Created By: Yi-Min Lin

@sync-by-unito sync-by-unito bot changed the title Check Bubble db diagram for network Check Bubble db diagram for network application Oct 26, 2021
@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 26, 2021

➤ Yi-Min Lin commented:

Bubble db for network applications 的 db diagram: https://dbdiagram.io/d/6177a0c0fa17df5ea66ebef9 ( https://dbdiagram.io/d/6177a0c0fa17df5ea66ebef9 )

  1. params 的用途是紀錄使用者控制的 parameters(如截圖顯示的彈出視窗)
  2. 但像是 token, cid 因為用途跟上述 parameters 很不一樣,不確定要為他們個單獨開一個欄位(型態為 bool,如果為 true 就是需要傳遞這個參數),還是為他們多開一種 type

取 token 跟 cid 需要各自呼叫特定的函式(不是 user 控制的),沒辦法像 #1 說的 params 一樣直接把 array render 出來

@numbersprotocol numbersprotocol deleted a comment from sync-by-unito bot Oct 26, 2021
@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 26, 2021

➤ Tammy Yang commented:

Tammy ( https://app.slack.com/team/U046CC276 )19:20 ( https://dt42-numbers.slack.com/archives/C3CHPJTS4/p1635247238167200 )
@Yimin ( https://dt42-numbers.slack.com/team/U0272MJ3PV2 ) 剛剛的討論有件事情想更改
原本建議把 param 整個用 text 的方式寫在 action 裡面
這是因為考量到只需要一個 call 就可以拿全
但後來我又看了一下,覺得維持目前兩個 table,點選 Network Applications 的時候取得 actions
然後 action 裡面的 params 設計為 parameter 的 ID list 好像就可以了
這樣第二個 call 取 params 的時候,首先已知有多少個 params,可以預留空間 (例如一張卡一個 param)
整個 db 設計上也比較乾淨

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 26, 2021

➤ Tammy Yang commented:

Follow-up actions

  1. Update dbdiagram based on the discussion
  2. Update bubble db based on the final dbdiagram
  3. Create a network application spec draft and ping Tammy to fill in information related to CaptureClub API
  4. Open asana tasks in Capture App to

a. Ask Tammy complete #3
b. Update Capture App based on the dbdiagram

@sync-by-unito sync-by-unito bot closed this as completed Oct 26, 2021
@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 27, 2021

➤ Yi-Min Lin commented:

有一個昨天沒提到的問題是 Capture APP UI 可能需要沒那麼 trivial 的修改,因為現在用的彈出視窗不支援多種 input type(只能全部都 text 或全部都 dropdown)
可能需要 survey 一下其他可以達成的 component 如何使用

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 27, 2021

➤ Yi-Min Lin commented:

關於 DB 的部分目前修改為這樣:

  1. 保留 params 為另一個 table,actions.params 紀錄 array of params IDs
  2. param.name 指的就是昨天原本提到 JSON 中 param 的 key (e.g. nft_chain, price)
  3. param.default_values 先設為 string array,如果是 single input 就拿第一個 element?

Table actions {
_id str [pk, note: "Bubble ID"]
title str
description str
price int
banner_image_url str
base_url str
params "str[]" [ref: > params._id]
}

Table params {
_id str [pk, note: "Bubble ID"]
name str
display_text str
description str
user_input boolean
type param_type
default_values "str[]"
placeholder str
}

Enum param_type {
number
text
dropdown
}

https://dbdiagram.io/d/6177a0c0fa17df5ea66ebef9 ( https://dbdiagram.io/d/6177a0c0fa17df5ea66ebef9 )

@sync-by-unito
Copy link
Author

sync-by-unito bot commented Oct 27, 2021

➤ Tammy Yang commented:

Yi-Min Lin

微調,把 actions 裡面的 price 改為 action_cost 並且從 int 改為 float
其他都沒問題,已整回公司主帳號

Table actions [headercolor: #27ae60] {
 _id str [pk, note: "Bubble ID"]
 title str
 description str
 action_cost float //in NUM
 banner_image_url str
 base_url str //API URL
 params "str[]" [ref: > params._id]
}

Table params [headercolor: #8e44ad] {
 _id str [pk, note: "Bubble ID"]
 name str
 display_text str
 description str
 user_input boolean
 type param_type
 default_values "str[]"
 placeholder str
}

Enum param_type {
 number
 text
 dropdown
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant