

-------------------------------------------------------------------------------
--  vehicle info
-------------------------------------------------------------------------------
CREATE TABLE VEHICLE_INFO(
        ID BIGINT NOT NULL,
	NAME VARCHAR(200),
	CODE VARCHAR(200),
	STATUS INTEGER,
	WEIGHT INTEGER,
	SEAT INTEGER,
	TYPE VARCHAR(50),
	COLOR VARCHAR(50),
	BUY_DATE DATE,
	CLIVTA_DATE DATE,
	VI_DATE DATE,
	PRICE INTEGER,
	ENGINE_NUMBER VARCHAR(50),
	VIN VARCHAR(50),
	DESCRIPTION VARCHAR(200),
	USING_UNIT VARCHAR(50),
	TENANT_ID VARCHAR(64),
        CONSTRAINT PK_VEHICLE_INFO PRIMARY KEY(ID)
);

COMMENT ON TABLE VEHICLE_INFO IS '车辆信息';
COMMENT ON COLUMN VEHICLE_INFO.ID IS '主键';
COMMENT ON COLUMN VEHICLE_INFO.NAME IS '名称';
COMMENT ON COLUMN VEHICLE_INFO.CODE IS '车牌号';
COMMENT ON COLUMN VEHICLE_INFO.STATUS IS '状态，在库，使用，维修，报废';
COMMENT ON COLUMN VEHICLE_INFO.WEIGHT IS '载重，吨';
COMMENT ON COLUMN VEHICLE_INFO.SEAT IS '座位，个';
COMMENT ON COLUMN VEHICLE_INFO.TYPE IS '类型，小型车';
COMMENT ON COLUMN VEHICLE_INFO.COLOR IS '颜色';
COMMENT ON COLUMN VEHICLE_INFO.BUY_DATE IS '购买时间';
COMMENT ON COLUMN VEHICLE_INFO.CLIVTA_DATE IS '机动车交通事故责任强制保险时间';
COMMENT ON COLUMN VEHICLE_INFO.VI_DATE IS '商业险时间';
COMMENT ON COLUMN VEHICLE_INFO.PRICE IS '价格，分';
COMMENT ON COLUMN VEHICLE_INFO.ENGINE_NUMBER IS '发动机编号';
COMMENT ON COLUMN VEHICLE_INFO.VIN IS '出厂编号';
COMMENT ON COLUMN VEHICLE_INFO.DESCRIPTION IS '备注';
COMMENT ON COLUMN VEHICLE_INFO.USING_UNIT IS '使用单位';
COMMENT ON COLUMN VEHICLE_INFO.TENANT_ID IS '租户';
