feat(customer): add migration file (#6205)
This commit is contained in:
@@ -25,9 +25,9 @@ export default class Address {
|
||||
|
||||
@ManyToOne(() => Customer, {
|
||||
fieldName: "customer_id",
|
||||
nullable: true,
|
||||
index: "IDX_customer_address_customer_id",
|
||||
})
|
||||
customer?: Customer
|
||||
customer: Customer
|
||||
|
||||
@Property({ columnType: "text", nullable: true })
|
||||
company: string | null = null
|
||||
|
||||
@@ -32,19 +32,17 @@ export default class CustomerGroupCustomer {
|
||||
entity: () => Customer,
|
||||
fieldName: "customer_id",
|
||||
index: "IDX_customer_group_customer_customer_id",
|
||||
nullable: true,
|
||||
cascade: [Cascade.REMOVE],
|
||||
})
|
||||
customer: Customer | null
|
||||
customer: Customer
|
||||
|
||||
@ManyToOne({
|
||||
entity: () => CustomerGroup,
|
||||
fieldName: "customer_group_id",
|
||||
index: "IDX_customer_group_customer_group_id",
|
||||
nullable: true,
|
||||
cascade: [Cascade.REMOVE],
|
||||
})
|
||||
customer_group: CustomerGroup | null
|
||||
customer_group: CustomerGroup
|
||||
|
||||
@Property({ columnType: "jsonb", nullable: true })
|
||||
metadata: Record<string, unknown> | null = null
|
||||
|
||||
@@ -49,6 +49,9 @@ export default class Customer {
|
||||
@Property({ columnType: "text", nullable: true })
|
||||
phone: string | null = null
|
||||
|
||||
@Property({ columnType: "boolean", default: false })
|
||||
has_account: boolean = false
|
||||
|
||||
@Index({ name: "IDX_customer_default_shipping_address_id" })
|
||||
@Property({ columnType: "text", nullable: true })
|
||||
default_shipping_address_id: string | null = null
|
||||
|
||||
Reference in New Issue
Block a user