package com.engine.salary.entity.salaryarchive.dto;

import com.engine.salary.annotation.Encrypt;
import com.engine.salary.annotation.TableTitle;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 薪资项目调整记录列表
 * <p>Copyright: Copyright (c) 2022</p>
 * <p>Company: 泛微软件</p>
 *
 * @author qiantao
 * @version 1.0
 **/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
//薪资项目调整记录列表")
//@TableOperates(tableType = WeaTableTypeEnum.CHECKBOX)
public class SalaryItemAdjustRecordListDTO {

    //主键id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 人员信息表的主键id
     */
    private Long employeeId;

    @TableTitle(title = "姓名", dataIndex = "username", key = "username")
    private String username;

    @TableTitle(title = "部门", dataIndex = "departmentName", key = "departmentName")
    private String departmentName;

    @TableTitle(title = "员工状态", dataIndex = "employeeStatus", key = "employeeStatus")
    private String employeeStatus;

    @TableTitle(title = "调整项目", dataIndex = "adjustItem", key = "adjustItem")
    private String adjustItem;

    @TableTitle(title = "调整前", dataIndex = "adjustBefore", key = "adjustBefore")
    @Encrypt
    private String adjustBefore;

    @TableTitle(title = "调整后", dataIndex = "adjustAfter", key = "adjustAfter")
    @Encrypt
    private String adjustAfter;

    @TableTitle(title = "调整原因", dataIndex = "adjustReason", key = "adjustReason")
    private String adjustReason;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @TableTitle(title = "生效日期", dataIndex = "effectiveTime", key = "effectiveTime")
    private Date effectiveTime;

    @TableTitle(title = "操作人", dataIndex = "operator", key = "operator")
    private String operator;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableTitle(title = "操作时间", dataIndex = "operateTime", key = "operateTime")
    private Date operateTime;

    @TableTitle(title = "备注", dataIndex = "description", key = "description")
    private String description;

    /**
     * 薪资档案id
     */
    @JsonIgnore
    private Long salaryArchiveId;

    /**
     * 薪资项目id
     */
    @JsonIgnore
    private Long salaryItemId;
}
