CREATE TABLE IF NOT EXISTS "basic_dealer_info" (
    "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
    "dealer_name" varchar NOT NULL,
    "dealer_id" varchar NOT NULL,
    "belong_business_id" bigint NOT NULL,
    "belong_business_name" varchar NOT NULL,
    "business_code" varchar,
    "contact_phone" varchar,
    "contact_name" varchar NOT NULL,
    "common_sale_area" varchar,
    "common_sale_area_id" bigint,
    "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    "remarks" varchar,
    "tenant_id" bigint NOT NULL,
    "deleted" bit NOT NULL DEFAULT FALSE,
    "creator" varchar DEFAULT '',
    "updater" varchar DEFAULT '',
    PRIMARY KEY ("id")
) COMMENT '经销商';
CREATE TABLE IF NOT EXISTS "basic_goods_category" (
    "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
    "name" varchar NOT NULL,
    "pid" bigint NOT NULL,
    "parent_id_path" varchar NOT NULL,
    "level" varchar NOT NULL,
    "sequence" 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 "basic_goods_verify" (
    "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
    "goods_name" varchar NOT NULL,
    "goods_id" varchar NOT NULL,
    "verify_name" varchar NOT NULL,
    "verify_agencies" varchar NOT NULL,
    "verify_start_time" datetime NOT NULL,
    "verify_end_time" datetime,
    "verify_data_url" varchar NOT NULL,
    "verify_is_forver" bit NOT NULL,
    "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    "tenant_id" bigint NOT NULL,
    "belong_business_id" bigint NOT NULL,
    "belong_business_name" varchar NOT NULL,
    "deleted" bit NOT NULL DEFAULT FALSE,
    "creator" varchar DEFAULT '',
    "updater" varchar DEFAULT '',
    PRIMARY KEY ("id")
) COMMENT '商品认证';
CREATE TABLE IF NOT EXISTS "basic_inputs_info" (
    "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
    "inputs_name" varchar NOT NULL,
    "inputs_id" varchar NOT NULL,
    "inputs_unit" varchar NOT NULL,
    "inputs_specs" varchar,
    "inputs_remarks" varchar NOT NULL,
    "inputs_photo_url" varchar,
    "shelf_life" int NOT NULL,
    "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 "basic_unit" (
    "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY,
    "unit_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 '商品';

