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

import com.engine.salary.enums.push.PushItemFieldEnum;
import com.engine.salary.enums.salaryformula.SalarySQLReferenceEnum;
import com.engine.salary.util.valid.DataCheck;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Collection;

/**
 * 数据推送配置明细
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PushSettingItemSaveParam {


    private Long id;

    /**
     * 设置id
     */
    @DataCheck(require = true, message = "设置id为空")
    private Long settingId;

    /**
     * 项目
     */
    @DataCheck(require = true, message = "项目为空")
    private String item;

    /**
     * 项目名
     */
    @DataCheck(require = true, message = "项目名为空")
    private String itemName;

    /**
     * 项目类型
     * @see SalarySQLReferenceEnum
     */
    @DataCheck(require = true, message = "数据来源")
    private String source;

    /**
     * 数据库字段
     */
    @DataCheck(require = true, message = "数据库字段为空")
    private String fieldName;

    /**
     * 字段类型
     */
    @DataCheck(require = true, message = "字段类型为空")
    private PushItemFieldEnum fieldType;

    /**
     * 排序
     */
    private Integer sortedIndex;


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

}