-- ----------------------------
-- 表结构: sys_vehicle_type
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_vehicle_type";
CREATE TABLE "public"."sys_vehicle_type" (
    "type_id" BIGSERIAL NOT NULL,
    "parent_id" int8,
    "type_name" varchar(100) COLLATE "pg_catalog"."default" NOT NULL,
    "level" int4 NOT NULL,
    "create_by" varchar(64) COLLATE "pg_catalog"."default",
    "create_time" timestamp(6),
    "update_by" varchar(64) COLLATE "pg_catalog"."default",
    "update_time" timestamp(6),
    "remark" varchar(500) COLLATE "pg_catalog"."default"
);
COMMENT ON COLUMN "public"."sys_vehicle_type"."type_id" IS '车辆类型ID';
COMMENT ON COLUMN "public"."sys_vehicle_type"."parent_id" IS '父类型ID';
COMMENT ON COLUMN "public"."sys_vehicle_type"."type_name" IS '类型名称';
COMMENT ON COLUMN "public"."sys_vehicle_type"."level" IS '类型级别 (1:一级, 2:二级)';
COMMENT ON COLUMN "public"."sys_vehicle_type"."create_by" IS '创建者';
COMMENT ON COLUMN "public"."sys_vehicle_type"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."sys_vehicle_type"."update_by" IS '更新者';
COMMENT ON COLUMN "public"."sys_vehicle_type"."update_time" IS '更新时间';
COMMENT ON COLUMN "public"."sys_vehicle_type"."remark" IS '备注';
COMMENT ON TABLE "public"."sys_vehicle_type" IS '车辆类型表';

-- ----------------------------
-- 主键结构: table sys_vehicle_type
-- ----------------------------
ALTER TABLE "public"."sys_vehicle_type" ADD CONSTRAINT "sys_vehicle_type_pkey" PRIMARY KEY ("type_id");

-- ----------------------------
-- 外键结构: table sys_vehicle_type
-- ----------------------------
ALTER TABLE "public"."sys_vehicle_type" ADD CONSTRAINT "sys_vehicle_type_fk1" FOREIGN KEY ("parent_id") REFERENCES "public"."sys_vehicle_type" ("type_id") ON DELETE NO ACTION ON UPDATE NO ACTION; 