liding
4 天以前 3b71cac369fb246ceafa59ffa3b775c2afc8add4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
drop table if exists production_product_main;
create table production_product_main
(
    id            bigint auto_increment
        primary key,
    product_no    varchar(255) not null comment '报工单号',
    user_id       bigint       not null comment '报工用户id',
    work_order_id bigint       not null comment '工单id',
    status        int          not null comment '状态 0 待报工 1 待确认',
    create_time   datetime     null comment '录入时间',
    tenant_id          bigint         not null comment '租户id'
);
 
drop table if exists production_product_output;
create table production_product_output
(
    id               bigint auto_increment
        primary key,
    product_main_id  bigint         not null comment '报工单id',
    product_model_id bigint         not null comment '产品id',
    quantity         numeric(16, 4) not null comment '数量',
    create_time      datetime       null comment '录入时间',
    tenant_id          bigint         not null comment '租户id'
);
 
drop table if exists production_product_input;
create table production_product_input
(
    id               bigint auto_increment
        primary key,
    product_main_id  bigint         not null comment '报工单id',
    product_model_id bigint         not null comment '产品id',
    quantity         numeric(16, 4) not null comment '数量',
    create_time      datetime       null comment '录入时间',
    tenant_id          bigint         not null comment '租户id'
)