liyong
2026-01-20 ca0565e53494417b3779759f8d3898e07bfd5929
doc/create_table_product_structure.sql
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,16 @@
# äº§å“ç»“æž„
drop table if exists product_structure;
create table product_structure
(
    id                 bigint auto_increment
        primary key,
    product_model_id         bigint         not null comment '产品id',
    process_id         bigint         not null comment '工序id',
    unit_quantity      numeric(16, 4) not null comment '单位产出需要数量',
    demanded_quantity  numeric(16, 4) not null comment '需求数量',
    unit               varchar(255)   not null comment '单位',
    disk_quantity      numeric(16, 4) not null comment '盘数量',
    tenant_id          bigint         not null comment '租户id'
);
alter table product_structure
    add parent_id bigint null comment '父id';