CREATE TABLE IF NOT EXISTS "flow_outbound" (
    "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
    "vendor_id" varchar NOT NULL,
    "vendor_name" varchar NOT NULL,
    "out_bound_id" varchar NOT NULL,
    "out_bound_time" datetime NOT NULL,
    "carrier_vehicles" varchar,
    "carrier" varchar,
    "carrier_contact" varchar,
    "block_state" bit NOT NULL,
    "block_chain_id" varchar,
    "block_chain_block_identity" varchar,
    "belong_business_id" bigint NOT NULL,
    "belong_business_name" varchar NOT NULL,
    "tenant_id" bigint NOT NULL,
    "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    "deleted" bit NOT NULL DEFAULT FALSE,
    "creator" varchar DEFAULT '',
    "updater" varchar DEFAULT '',
    PRIMARY KEY ("id")
) COMMENT '出库单';
CREATE TABLE IF NOT EXISTS "flow_outbound_goods" (
    "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
    "bind_id" varchar NOT NULL,
    "goods_id" varchar NOT NULL,
    "goods_name" varchar NOT NULL,
    "out_bound_id" varchar NOT NULL,
    "harvest_batch_id" varchar NOT NULL,
    "identity_code_num" int,
    "goods_unit" varchar,
    "goods_weight" varchar,
    "goods_unit_price" varchar,
    "total_price" varchar,
    "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    "belong_business_id" bigint NOT NULL,
    "belong_business_name" varchar NOT NULL,
    "tenant_id" bigint NOT NULL,
    "deleted" bit NOT NULL DEFAULT FALSE,
    "creator" varchar DEFAULT '',
    "updater" varchar DEFAULT '',
    PRIMARY KEY ("id")
) COMMENT '出库单商品';