chore(order): custom display id (#14024)
* chore(order): Accept a custom display generator option * chore(order): Accept a custom display generator option * wip * wip * finalize * Create tricky-olives-battle.md * fields * changeset * update integration tests * update migrations * fix changeset
This commit is contained in:
@@ -11,6 +11,7 @@ const _Order = model
|
||||
.define("Order", {
|
||||
id: model.id({ prefix: "order" }).primaryKey(),
|
||||
display_id: model.autoincrement().searchable(),
|
||||
custom_display_id: model.text().nullable(),
|
||||
region_id: model.text().nullable(),
|
||||
customer_id: model.text().nullable(),
|
||||
version: model.number().default(1),
|
||||
@@ -71,6 +72,12 @@ const _Order = model
|
||||
unique: false,
|
||||
where: "deleted_at IS NULL",
|
||||
},
|
||||
{
|
||||
name: "IDX_order_custom_display_id",
|
||||
on: ["custom_display_id"],
|
||||
unique: true,
|
||||
where: "deleted_at IS NULL",
|
||||
},
|
||||
{
|
||||
name: "IDX_order_region_id",
|
||||
on: ["region_id"],
|
||||
|
||||
Reference in New Issue
Block a user