package com.ruoyi.database.domain;

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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@TableName("police_leave_approval")
@ApiModel("民警请（休）假审批表")
public class PoliceLeaveApproval {

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty("主键ID")
    private Long id;

    @ApiModelProperty("姓名")
    private String name;

    @ApiModelProperty("身份证号码")
    private String idCard;

    @ApiModelProperty("参加工作时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate joinWorkTime;

    @ApiModelProperty("联系电话")
    private String phone;

    @ApiModelProperty("所在单位")
    private String deptName;

    @ApiModelProperty("请假事由（1-公休假 2-事假 3-探亲假 4-婚假 5-产假 6-护理假 7-病假 8-育儿假 9-其他）")
    private Integer leaveType;

    @ApiModelProperty("请假开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime startDate;

    @ApiModelProperty("请假结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime endDate;

    @ApiModelProperty("所在单位意见")
    private String deptOpinion;

    @ApiModelProperty("政治处意见")
    private String politicalOpinion;

    @ApiModelProperty("局领导审批意见")
    private String leaderApproval;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

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

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("修改时间")
    private LocalDateTime updateTime;

    @ApiModelProperty("修改人")
    private String updateBy;

    @TableField(exist = false)
    private String fTime;
    @TableField(exist = false)
    private String eTime;
}