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

import com.alibaba.excel.annotation.ExcelIgnore;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gci.boot.annotation.repeat.TableRepeat;
import com.gci.boot.common.dict.annotation.Dict;
import com.gci.boot.common.validated.SaveValidated;
import com.gci.boot.common.validated.UpdateValidated;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

@Data
@TableName("tb_upkeep_check")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "保养台账审核表", description = "保养台账审核表")
@TableRepeat(aClass = TbUpkeepCheck.class,groups = {SaveValidated.class, UpdateValidated.class})
public class TbUpkeepCheck implements Serializable {

    private static final long serialVersionUID = 1L;

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

    @ApiModelProperty("关联保养台账表id")
    private String upkeepBillId;

    @ApiModelProperty("审核结果12/维修结果34/保养结果56")
    @Dict(dicCode = "repair_check_result")
    private String checkResult;

    @ApiModelProperty("审批人")
    private String checkPeople;

    @ApiModelProperty("审核人类型 审核人-1   审批人-2  复核人-3  提交人-4 派单人-5 报价人-6 维修人-7 保养人-8")
    @Dict(dicCode = "check_people_type")
    private String checkPeopleType;

    @ApiModelProperty("审批时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date checkTime;

    @ApiModelProperty("审核意见")
    private String checkIdea;

    @ApiModelProperty("审批类型 1-审核结果，2-领导审批，3-维修结果, 4-保养结果, 5-复核结果")
    @Dict(dicCode = "repair_check")
    private String checkType;


    /**所属机构*/
    @ApiModelProperty(value = "所属部门")
    @ExcelIgnore
    private String sysOrgCode;
    /**创建日期*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    @ExcelIgnore
    private Date createTime;
    /**更新日期*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    @ExcelIgnore
    private Date updateTime;
    /**创建人*/
    @ApiModelProperty(value = "创建人")
    @ExcelIgnore
    private String createBy;
    /**更新人*/
    @ApiModelProperty(value = "更新人")
    @ExcelIgnore
    private String updateBy;

}
