CREATE TABLE IF NOT EXISTS "veneers"
(
    "id"                  bigint        NOT NULL GENERATED BY DEFAULT AS IDENTITY,
    "veneer_no"           varchar(32)   NOT NULL,
    "source_veneer_no"    varchar(32)            DEFAULT NULL,
    "batch_no"            varchar(32)            DEFAULT NULL,
    "organ_id"            bigint        NOT NULL DEFAULT 1,
    "classification_name" varchar(64)   NOT NULL,
    "veneer_name"         varchar(64)   NOT NULL,
    "product_level"       tinyint       NOT NULL,
    "brand"               varchar(64)            DEFAULT NULL,
    "spec"                varchar(64)            DEFAULT NULL,
    "material"            varchar(64)            DEFAULT NULL,
    "color"               varchar(32)            DEFAULT NULL,
    "factory"             varchar(128)           DEFAULT NULL,
    "num"                 int                    DEFAULT NULL,
    "defect"              bit           NOT NULL DEFAULT FALSE,
    "defect_data"         clob                   DEFAULT NULL,
    "remain"              bit           NOT NULL DEFAULT FALSE,
    "source_plan_no"      bigint                 DEFAULT NULL,
    "plan_no"             bigint                 DEFAULT NULL,
    "status"              tinyint       NOT NULL DEFAULT 0,
    "width"               decimal(8, 3) NOT NULL DEFAULT 0.000,
    "length"              decimal(8, 3) NOT NULL DEFAULT 0.000,
    "thickness"           decimal(8, 3) NOT NULL DEFAULT 0.000,
    "remark"              varchar(255)           DEFAULT NULL,
    "file_id"             bigint                 DEFAULT NULL,
    "creator"             varchar(64)            DEFAULT NULL,
    "create_time"         timestamp     NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "updater"             varchar(64)            DEFAULT NULL,
    "update_time"         timestamp     NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "deleted"             bit           NOT NULL DEFAULT FALSE,
    PRIMARY KEY ("id")
) COMMENT '贴皮表 veneers_{N}';