package com.ruoyi.database.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

@Data
@TableName("business_trip_approval")
@ApiModel("出差审批单")
public class BusinessTripApproval {

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

    @ApiModelProperty("出差人员姓名")
    @TableField(condition = SqlCondition.LIKE)
    private String name;

    @ApiModelProperty("部门")
    @TableField(condition = SqlCondition.LIKE)
    private String department;

    @ApiModelProperty("出差事由")
    @TableField(condition = SqlCondition.LIKE)
    private String reason;

    @ApiModelProperty("出差目的地")
    @TableField(condition = SqlCondition.LIKE)
    private String destination;

    @ApiModelProperty("出差开始日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate startDate;

    @ApiModelProperty("出差结束日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate endDate;

    @ApiModelProperty("拟乘交通工具（0-飞机/1-火车/2-汽车/3-轮船/4-其他）")
    @TableField(condition = SqlCondition.EQUAL)
    private String transport;

    @ApiModelProperty("是否自带公务车辆（0-否 1-是）")
    private Integer hasOfficialCar;

    @ApiModelProperty("审批流程 0-未审批 1-部门审批通过 2-部门审批不通过 3-警务保障部门审批通过 4-警务保障部门审批不通过 5-局领导审批通过 6-局领导审批不通过")
    private Integer state;

    @ApiModelProperty("单位负责人意见")
    private String deptLeaderOpinion;

    @ApiModelProperty("局分管负责人意见")
    private String LeaderOpinion;

    @ApiModelProperty("局主要领导意见")
    private String mainLeaderOpinion;

    @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;
}