-- ----------------------------
-- 表结构: sys_vehicle_info
-- ----------------------------
DROP TABLE IF EXISTS "public"."sys_vehicle_info";
CREATE TABLE "public"."sys_vehicle_info" (
    "vehicle_id" BIGSERIAL NOT NULL,
    "license_plate_number" varchar(50) COLLATE "pg_catalog"."default" NOT NULL UNIQUE,
    "vin_number" varchar(50) COLLATE "pg_catalog"."default" UNIQUE,
    "type_id" int8 NOT NULL,
    "brand" varchar(100) COLLATE "pg_catalog"."default",
    "owning_unit" varchar(255) COLLATE "pg_catalog"."default",
    "contact_person" varchar(100) COLLATE "pg_catalog"."default",
    "phone_number" varchar(20) COLLATE "pg_catalog"."default",
    "image_url" varchar(255) COLLATE "pg_catalog"."default",
    "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_info"."vehicle_id" IS '车辆ID';
COMMENT ON COLUMN "public"."sys_vehicle_info"."license_plate_number" IS '车牌号';
COMMENT ON COLUMN "public"."sys_vehicle_info"."vin_number" IS 'VIN码';
COMMENT ON COLUMN "public"."sys_vehicle_info"."type_id" IS '类型ID';
COMMENT ON COLUMN "public"."sys_vehicle_info"."brand" IS '品牌';
COMMENT ON COLUMN "public"."sys_vehicle_info"."owning_unit" IS '所属单位';
COMMENT ON COLUMN "public"."sys_vehicle_info"."contact_person" IS '联系人';
COMMENT ON COLUMN "public"."sys_vehicle_info"."phone_number" IS '电话';
COMMENT ON COLUMN "public"."sys_vehicle_info"."image_url" IS '图片URL';
COMMENT ON COLUMN "public"."sys_vehicle_info"."create_by" IS '创建者';
COMMENT ON COLUMN "public"."sys_vehicle_info"."create_time" IS '创建时间';
COMMENT ON COLUMN "public"."sys_vehicle_info"."update_by" IS '更新者';
COMMENT ON COLUMN "public"."sys_vehicle_info"."update_time" IS '更新时间';
COMMENT ON COLUMN "public"."sys_vehicle_info"."remark" IS '备注';
COMMENT ON TABLE "public"."sys_vehicle_info" IS '车辆信息表';

-- ----------------------------
-- 主键结构: table sys_vehicle_info
-- ----------------------------
ALTER TABLE "public"."sys_vehicle_info" ADD CONSTRAINT "sys_vehicle_info_pkey" PRIMARY KEY ("vehicle_id");

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