
CREATE TABLE `kwf_truck_manager`
(
    id                      int unsigned                                                           NOT NULL AUTO_INCREMENT COMMENT '主键',
    group_id                int                                                                    DEFAULT NULL,
    company_id              varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci          DEFAULT NULL COMMENT '公司id',
    license_plate           varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci           NOT NULL COMMENT '车牌号',
    vin                     varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci           DEFAULT NULL COMMENT '车辆唯一识别码',
    password                varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci           DEFAULT NULL,
    thirty_mileage          double                                                                 DEFAULT NULL COMMENT '30日里程',
    the_mileage             double                                                                 DEFAULT NULL COMMENT '总里程',
    axle_num_id             int unsigned NOT NULL                                                  DEFAULT '1' COMMENT '轴数表id',
    bind_truck_id           int                                                                    DEFAULT NULL COMMENT '绑定车辆id',
    driver_id               int                                                                    DEFAULT NULL COMMENT '关联司机',
    attr_id                 varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci          DEFAULT NULL COMMENT '归属id',
    brand                   varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci           DEFAULT NULL COMMENT '品牌',
    vehicle_license_image   varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci          DEFAULT NULL COMMENT '车辆行驶证图片',
    verify_time             datetime                                                               DEFAULT NULL COMMENT '年审时间',
    accredit                varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci          DEFAULT NULL COMMENT '道路许可证图片',
    accredit_validaty_start datetime                                                               DEFAULT NULL COMMENT '道路许可有效期开始',
    accredit_validaty_end   datetime                                                               DEFAULT NULL COMMENT '道路许可有效期结束',
    state                   tinyint                                                                DEFAULT '0' COMMENT '1已绑定',
    del_flag                tinyint                                                                not null default 0  comment '0-未删除，1-删除',
    create_time             datetime                                                               not null default CURRENT_TIMESTAMP comment '创建时间',
    update_time             datetime                                                               not null default current_timestamp on update CURRENT_TIMESTAMP comment '更新时间',
    create_user             varchar(255)                                                           not null default '' comment '创建人',
    update_user             varchar(255)                                                           not null default '' comment '更新人',
    PRIMARY KEY (`id`) USING BTREE,
    KEY   `idx_lp` (`license_plate`) USING BTREE
) COMMENT='车辆表';