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

import com.engine.hrmelog.annotation.ElogTransform;
import com.engine.salary.annotation.TableTitle;
import com.engine.salary.enums.push.PushRecordStatusEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Collection;
import java.util.Date;

/**
 * 数据推送记录列表
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PushRecordDTO {

    @ElogTransform(name = "")
    private Long id;


    /**
     * 记录名
     */
    @TableTitle(title = "记录名", dataIndex = "name", key = "name")
    private String name;


    /**
     * 核算记录id
     */
    private Long acctRecordId;


    /**
     * 推送配置id
     */
    private Long settingId;

    /**
     * 建模id
     */
    private Integer modeId;

    /**
     * 数据库表名
     */
    @TableTitle(title = "数据表名", dataIndex = "tableName", key = "tableName")
    private String tableName;


    /**
     * 推送状态
     *
     * @see PushRecordStatusEnum
     */
    @TableTitle(title = "推送状态", dataIndex = "statusName", key = "statusName")
    private String statusName;
    private Integer status;

    /**
     * 执行时间
     */
    @TableTitle(title = "执行开始时间", dataIndex = "startTime", key = "startTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;

    /**
     *  结束时间
     */
    @TableTitle(title = "执行结束时间", dataIndex = "endTime", key = "endTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;


    /**
     * 推送类型，0推送，1撤回
     */
    private Integer type;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 创建人
     */
    private Long creator;

    /**
     * 是否已删除。0：未删除、1：已删除
     */
    private Integer deleteType;

    /**
     * 租户ID
     */
    private String tenantKey;

    /**
     * 更新时间
     */
    private Date updateTime;


    //主键id集合
    private Collection<Long> ids;

}