liding
17 小时以前 1e8ccfec6ebcf7787def13165d9932b0cccefc49
main-business/src/main/resources/db/migration/postgresql/V20250604104500__create_table_pending_inventory.sql
@@ -5,23 +5,29 @@
    supplier_name             VARCHAR(255)   NOT NULL,                           -- 供货商名称
    coal                      VARCHAR(50)    NOT NULL,                           -- 煤种
    unit                      VARCHAR(50)    NOT NULL,                           -- 单位
    inventory_quantity        DECIMAL(10, 2) NOT NULL,                           -- 库存数量
    price_including_tax       DECIMAL(10, 2) NOT NULL,                           -- 单价(含税)
    total_price_including_tax DECIMAL(10, 2) NOT NULL,                           -- 总价(含税)
    registrant                VARCHAR(50)    NOT NULL,                           -- 登记人
    registration_time         TIMESTAMP      NOT NULL DEFAULT CURRENT_TIMESTAMP, -- 登记时间
    inventory_quantity         NUMERIC(10,2)              NOT NULL,              -- 库存数量
    price_including_tax        NUMERIC(10,2)              NOT NULL,              -- 单价(含税)
    total_price_including_tax  NUMERIC(10,2)              NOT NULL,              -- 总价(含税)
    registrant                 VARCHAR(50),                                      -- 登记人
    registration_time          TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP,          -- 登记时间
    price_excluding_tax        VARCHAR(255),                                     -- 单价(不含税)
    total_price_excluding_tax  VARCHAR(255),                                     -- 总价(不含税)
    registrant_id              VARCHAR(32),                                      -- 登记人ID
    registration_date          DATE,                                             -- 登记日期
    supplier_id                BIGINT,                                           -- 供货商ID
    coal_id                    BIGINT,                                            -- 煤种ID
    deleted                   INT            NOT NULL DEFAULT 0,                 -- 软删除标志:0=未删除,1=已删除
    create_by                 VARCHAR(255),                                      -- 创建人用户名
    create_time               TIMESTAMP WITHOUT TIME ZONE,                       -- 创建时间,默认当前时间
    update_by                 VARCHAR(255),                                      -- 最后更新人用户名
    update_time               TIMESTAMP WITHOUT TIME ZONE                        -- 最后更新时间,默认当前时间
    deleted                    INTEGER         DEFAULT 0,                        -- 软删除标志,0=未删除,1=已删除
    create_by                  VARCHAR(255),                                     -- 创建该记录的用户
    create_time                TIMESTAMP(6),                                     -- 记录创建时间
    update_by                  VARCHAR(255),                                     -- 最后修改该记录的用户
    update_time                TIMESTAMP(6)                                     -- 记录最后更新时间
);
-- 添加表注释
COMMENT ON TABLE pending_inventory IS '待入库表';
-- 添加字段注释
-- 字段注释
COMMENT ON COLUMN pending_inventory.id IS '主键ID';
COMMENT ON COLUMN pending_inventory.supplier_name IS '供货商名称';
COMMENT ON COLUMN pending_inventory.coal IS '煤种';
@@ -31,9 +37,16 @@
COMMENT ON COLUMN pending_inventory.total_price_including_tax IS '总价(含税)';
COMMENT ON COLUMN pending_inventory.registrant IS '登记人';
COMMENT ON COLUMN pending_inventory.registration_time IS '登记时间';
COMMENT ON COLUMN pending_inventory.price_excluding_tax IS '单价(不含税)';
COMMENT ON COLUMN pending_inventory.total_price_excluding_tax IS '总价(不含税)';
COMMENT ON COLUMN pending_inventory.registrant_id IS '登记人ID';
COMMENT ON COLUMN pending_inventory.registration_date IS '登记日期';
COMMENT ON COLUMN pending_inventory.supplier_id IS '供货商ID';
COMMENT ON COLUMN pending_inventory.coal_id IS '煤种ID';
COMMENT ON COLUMN pending_inventory.deleted IS '软删除标志,0=未删除,1=已删除';
COMMENT ON COLUMN pending_inventory.create_by IS '创建该记录的用户';
COMMENT ON COLUMN pending_inventory.create_time IS '记录创建时间';
COMMENT ON COLUMN pending_inventory.update_by IS '最后修改该记录的用户';
COMMENT ON COLUMN pending_inventory.update_time IS '记录最后更新时间';