package com.aiotagro.cattletrade.business.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 车辆管理实体类
 *
 * @author System
 * @date 2025-01-20
 */
@Data
@TableName("vehicle")
public class Vehicle implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 车牌号
     */
    @TableField("license_plate")
    private String licensePlate;

    /**
     * 车头照片URL
     */
    @TableField("car_front_photo")
    private String carFrontPhoto;

    /**
     * 车尾照片URL
     */
    @TableField("car_rear_photo")
    private String carRearPhoto;

    /**
     * 行驶证照片URL
     */
    @TableField("driving_license_photo")
    private String drivingLicensePhoto;

    /**
     * 牧运通备案码
     */
    @TableField("record_code")
    private String recordCode;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;

    /**
     * 逻辑删除标记(0-正常,1-已删除)
     */
    @TableLogic(value = "0", delval = "1")
    @TableField("is_delete")
    private Integer isDelete;

    /**
     * 创建时间
     */
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * 创建人ID
     */
    @TableField("created_by")
    private Integer createdBy;

    /**
     * 更新时间
     */
    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    /**
     * 更新人ID
     */
    @TableField("updated_by")
    private Integer updatedBy;
}

