最低价格约束

This commit is contained in:
2026-04-07 13:51:19 +08:00
parent c684523cb8
commit fccb83c0e5
5 changed files with 33 additions and 3 deletions

View File

@@ -757,6 +757,7 @@ create table product_sku (
code text not null unique,
name text not null,
price decimal not null,
price_min decimal not null,
status int not null default 1,
created_at timestamptz default current_timestamp,
updated_at timestamptz default current_timestamp,
@@ -773,7 +774,8 @@ comment on column product_sku.product_id is '产品ID';
comment on column product_sku.discount_id is '折扣ID';
comment on column product_sku.code is 'SKU 代码:格式为 key=value,key=value,...其中key:value 是 SKU 的属性,多个属性用逗号分隔';
comment on column product_sku.name is 'SKU 可读名称';
comment on column product_sku.price is '定价';
comment on column product_sku.price_min is '最低价格';
comment on column product_sku.min is '最小购买量';
comment on column product_sku.status is 'SKU状态0-禁用1-正常';
comment on column product_sku.created_at is '创建时间';
comment on column product_sku.updated_at is '更新时间';