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

import com.engine.salary.annotation.SalaryTable;
import com.engine.salary.annotation.SalaryTableColumn;
import com.engine.salary.annotation.TableTitle;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Author weaver_cl
 * 
 * @Date 2022/3/11
 * @Version V1.0
 **/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@SalaryTable(pageId = "ee8c0e7f-4096-4150-9491-823e24d37765",
        fields = "id, insurance_name, is_use, welfare_type, payment_scope",
        fromSql = "FROM hrsa_insurance_category",
        orderby = "id desc",
        primarykey = "id"
        // operates = {
        //         @SalaryTableOperate(index = "0", text = "编辑"),
        // }
)
public class ICategoryListDTO {

    @SalaryTableColumn(column = "id", display = false)
    private Long id;


    @SalaryTableColumn(column = "insurance_name", width = "20%", text = "福利名称")
    @TableTitle(title = "福利名称",dataIndex = "insuranceName",key = "insuranceName")
    private String insuranceName;


    @SalaryTableColumn(column = "is_use", width = "20%", text = "是否启用")
    @TableTitle(title = "启用",dataIndex = "isUse",key = "isUse")
    private Integer isUse;

    @SalaryTableColumn(column = "welfare_type", width = "20%", text = "类型", transmethod ="com.engine.salary.transmethod.ICategoryTransMethod.getWelfareTypeName")
    @TableTitle(title = "类型",dataIndex = "welfareType",key = "welfareType")
    private String welfareType;
    private String welfareTypeSpan;


    @SalaryTableColumn(column = "payment_scope", width = "30%", text = "缴纳对象",transmethod = "com.engine.salary.transmethod.ICategoryTransMethod.getPaymentcopeTypeName")
    @TableTitle(title = "缴纳对象",dataIndex = "paymentScope",key = "paymentScope")
    private String paymentScope;
    private String paymentScopeSpan;

    @SalaryTableColumn(column = "operate", width = "10%", text = "操作")
    private String operate;
}
