package com.gci.boot.modules.driver.entity;

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

import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gci.boot.annotation.Query.SelectQuery;
import com.gci.boot.common.dict.annotation.Dict;
import com.gci.boot.common.dict.excel.DictConverter;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 司机打卡
 * </p>
 *
 * @author xushuhan
 * @since 2023-09-13
 */
@Getter
@Setter
@TableName("tb_driver_sign_in")
@ApiModel(value = "TbDriverSignIn对象", description = "司机打卡")
@ColumnWidth(20)
public class TbDriverSignIn implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ExcelIgnore
    private String id;

    @ApiModelProperty("所属项目")
    @SelectQuery(Type = SelectQuery.SelectType.EQ)
    @ExcelIgnore
    private String projectId;

    @ApiModelProperty("所属项目")
    @SelectQuery
    @ExcelProperty(value = "所属项目", index = 0)
    private String projectName;

    @ApiModelProperty("车辆id")
    @SelectQuery(Type = SelectQuery.SelectType.EQ)
    @ExcelIgnore
    private String vehicleId;

    @ApiModelProperty("车牌号")
    @SelectQuery
    @ExcelProperty(value = "车牌号", index = 1)
    private String plateNumber;

    @ApiModelProperty("签到时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat("yyyy-MM-dd HH:mm:ss")
    @SelectQuery(Type = SelectQuery.SelectType.EQ)
    @ExcelProperty(value = "打卡时间", index = 4)
    private Date signInTime;

    @ApiModelProperty("签到日期")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat("yyyy-MM-dd")
    @SelectQuery(Type = SelectQuery.SelectType.EQ)
    @ExcelIgnore
    private Date signInDate;

    @ApiModelProperty("打卡类型（1签到，2签退）")
    @SelectQuery(Type = SelectQuery.SelectType.EQ)
    @Dict(dicCode = "sign_in_type")
    @ExcelProperty(value = "打卡类型", converter = DictConverter.class, index = 3)
    private String signInType;

    @ApiModelProperty("签到地址")
    @SelectQuery
    @ExcelProperty(value = "打卡地点", index = 5)
    private String signInAddress;

    @ApiModelProperty("司机id")
    @SelectQuery(Type = SelectQuery.SelectType.EQ)
    @ExcelIgnore
    private String driverId;

    @ApiModelProperty("司机名称")
    @SelectQuery
    @ExcelProperty(value = "司机", index = 2)
    private String driverName;

    @ApiModelProperty("操作类型（1用户，2系统自动，3后台）")
    @ExcelIgnore
    private String opType;

    @ApiModelProperty("备注")
    @ExcelIgnore
    private String remark;

    @ApiModelProperty("所属机构")
    @Dict(dictTable = "sys_depart", dicCode = "org_code", dicText = "depart_name")
    @ExcelIgnore
    private String sysOrgCode;

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

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

    @ApiModelProperty("创建人")
    @ExcelIgnore
    private String createBy;

    @ApiModelProperty("更新人")
    @ExcelIgnore
    private String updateBy;

    @ExcelIgnore
    @ApiModelProperty("删除标志")
    private Integer delFlag;
    
    @ApiModelProperty("签退id")
    @ExcelIgnore
    private String signOutId;

    @TableField(exist = false)
    @ExcelIgnore
    private String month;


    @ApiModelProperty("日期开始")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @org.springframework.format.annotation.DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    @ExcelIgnore
    private Date signInTimeStart;

    @ApiModelProperty("日期结束")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @org.springframework.format.annotation.DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    @ExcelIgnore
    private Date signInTimeEnd;
}
