liyong
昨天 aeeb860535c838103351ba7f72f509418bc5c6ef
2025-06-23 设备表DDL
已添加1个文件
58 ■■■■■ 文件已修改
doc/add.sql 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
doc/add.sql
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,58 @@
# è®¾å¤‡å°è´¦
create table `product-inventory-management`.device_repair
(
    id                 bigint auto_increment
        primary key,
    device_ledger_id   varchar(255) not null comment '设备台账id',
    repair_time        timestamp    null comment '报修日期',
    repair_name        varchar(255) not null comment '报修人',
    remark             varchar(255) not null comment '故障现象',
    maintenance_name   varchar      not null comment '维修人',
    maintenance_time   timestamp    null comment '维修时间',
    maintenance_result varchar(255) null comment '维修结果',
    status             int default 0 comment '状态',
    create_time        datetime     null comment '录入时间',
    update_time        datetime     null comment '更新时间',
    create_user        varchar(255) not null comment '录入人',
    update_user        varchar(255) not null comment '更新人',
    tenant_id          bigint       not null comment '租户id'
);
# è®¾å¤‡ç»´ä¿®
create table `product-inventory-management`.device_ledger
(
    id                           bigint auto_increment
        primary key,
    device_name                  varchar(255) not null comment '设备名称',
    device_model                 varchar(255) not null comment '规格型号',
    supplier_name                varchar(255) not null comment '供应商',
    unit                         varchar(255) not null comment '单位',
    number                       decimal      not null comment '数量',
    tax_including_price_unit     decimal      not null comment '含税单价',
    tax_including_price_total    decimal      not null comment '含税总价',
    tax_rate                     decimal      not null comment '税率',
    un_tax_including_price_total decimal      not null comment '不含税总价',
    create_time                  timestamp    null comment '录入时间',
    update_time                  timestamp    null comment '更新时间',
    create_user                  varchar(255) not null comment '录入人',
    update_user                  varchar(255) not null comment '更新人',
    tenant_id                    bigint       not null comment '租户id'
);
create table `product-inventory-management`.device_maintenance
(
    id                 bigint auto_increment
        primary key,
    device_ledger_id   varchar(255) not null comment '设备台账id',
    maintenance__plan_time        timestamp    null comment '计划保养日期',
    maintenance_actually_name   varchar(255)      not null comment '实际保养人',
    maintenance_actually_time   timestamp    null comment '实际保养日期',
    maintenance_result int not null  default 0 comment '保养结果 0 ç»´ä¿® 1 å®Œå¥½',
    status             int not null  default 0 comment '状态 0 å¾…保养 1 å®Œç»“',
    create_time        datetime     null comment '录入时间',
    update_time        datetime     null comment '更新时间',
    create_user        varchar(255) not null comment '录入人',
    update_user        varchar(255) not null comment '更新人',
    tenant_id          bigint       not null comment '租户id'
);