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

import com.cloudstore.eccom.pc.table.WeaTableType;
import com.engine.salary.annotation.SalaryTable;
import com.engine.salary.annotation.SalaryTableColumn;
import com.engine.salary.annotation.SalaryTableOperate;
import com.engine.salary.annotation.TableTitle;
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;

/**
 * 数据采集-考勤引用字段列表
 * <p>Copyright: Copyright (c) 2022</p>
 * <p>Company: 泛微软件</p>
 *
 * @author qiantao
 * @version 1.0
 **/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@SalaryTable(pageId = "b4f85287-e3f9-4275-adn9-7d06e54y6rj8", tableType = WeaTableType.CHECKBOX, operates = {
        @SalaryTableOperate(text = "查看明细")
})
public class AttendQuoteFieldListDTO {
    //主键id
    @JsonSerialize(using = ToStringSerializer.class)
//    @SalaryTableColumn(column = "id", display = false)
//    @TableTitle(title = "id",dataIndex = "id",key = "id")
    private Long id;

    @SalaryTableColumn(text = "字段名称", width = "10%", column = "fieldName")
    @TableTitle(title = "字段名称",dataIndex = "fieldName",key = "fieldName")
    private String fieldName;

    //来源。1：自定义、2：考勤模块
    @SalaryTableColumn(text = "来源", width = "10%", column = "sourceType",transmethod = "com.engine.salary.transmethod.TransMethod.fieldSourceType")
    @TableTitle(title = "来源",dataIndex = "sourceType",key = "sourceType")
    private String sourceType;

    //来源。1：自定义、2：考勤模块
    private String sourceTypeValue;

    //字段类型。1：数值、2：文本
    @SalaryTableColumn(text = "类型", width = "10%", column = "fieldType",transmethod = "com.engine.salary.transmethod.TransMethod.fieldType")
    @TableTitle(title = "类型",dataIndex = "fieldType",key = "fieldType")
    private String fieldType;

    //是否启用。0：否、1：是
    @SalaryTableColumn(text = "是否启用", width = "10%", column = "enableStatus")
    @TableTitle(title = "是否启用",dataIndex = "enableStatus",key = "enableStatus")
    private Integer enableStatus;

    //备注
    @SalaryTableColumn(text = "备注", width = "10%", column = "description")
    @TableTitle(title = "备注",dataIndex = "description",key = "description")
    private String description;
}
