We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
order.stocksRef
status == "completed"
stock.status == "received"
status != "completed"
completed
status
received
orderRef
order.status
productStatus[productId] = "received"
productStatus
stock: status: "idle" | "working" | "completed" | "received" product_id: string barista_id: number created_at: Timestamp start_working_at: Timestamp orderRef: DocumentReference order: order_statuses, complete_at, status=="completed" を削除 stocksRef: DocumentReference[] productStatus: { [productId+数字]: "idle" | "received" } required_products: { [productId]: number } product: stock: number を追加
order.required_products
required_products
※最新のデータがキャッシュされている場合
order: spend_to_make: 時間 stock:
The text was updated successfully, but these errors were encountered:
closed by #137
Sorry, something went wrong.
Harineko0
No branches or pull requests
目的
仕様
管理者側
order.stocksRef
にstockのパスを入れるstockを完成にしたらproduct.stockに1プラス
それぞれの
order.stocksRef
についてstatus == "completed"
の場合: そのstock.status == "received"
にするstatus != "completed"
の場合: 最新のcompleted
なstockのstatus
をreceived
にし、orderRef
をこの注文にし、元のorderRef
で指定されていた order にはこのstockを指定するorder.status
ではなくproductStatus[productId] = "received"
を用いるproductStatus
がreceived
になったらorder.status
もreceived
にする該当の注文: 1と同じ
別注文: 1を行った上でcomplete_atにproduct.spanを加算
ユーザー側
自分の注文以前の未受け取り注文を全てstream取得問題点
既存モデル
新モデル
DB設計
パフォーマンス問題
書き込みを増やし読み取りを減らす場合
order.required_products
その注文+それ以前の注文に必要な商品数を設定注文がreceivedがなったときに更新される
required_products
を更新する※最新のデータがキャッシュされている場合
統計情報
The text was updated successfully, but these errors were encountered: