package com.engine.salary.entity.sischeme.vo;

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

/**
 * @Author weaver_cl
 * 
 * @Date 2022/3/10
 * @Version V1.0
 **/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@SalaryTable(pageId = "98acb87d-1509-4078-8061-41ff45e9573b",
        fields = "a.id," +
                "a.scheme_name," +
                "a.payment_type as paymentType," +
                "GROUP_CONCAT(b.insurance_id SEPARATOR ',') insurance_id," +
                "GROUP_CONCAT(c.insurance_name SEPARATOR ',') insurance_name," +
                "a.remarks",
        fromSql = "FROM hrsa_social_security_scheme a," +
                "hrsa_scheme_detail b," +
                "hrsa_insurance_category c",
        orderby = "id desc",
        groupby = "id",
        primarykey = "id",
        operates = {
                @SalaryTableOperate(index = "0", text = "编辑"),
                @SalaryTableOperate(index = "1", text = "复制")
        }
)
public class SISchemeTableVO {
    /**
     * 主键
     */
    @SalaryTableColumn(column = "id", display = false)
    private Long id;

    /**
     * 方案名称
     */
    @SalaryTableColumn(column = "scheme_name", width = "20%", text = "方案名称")
    private String schemeName;

    /**
     * 缴纳类型
     */
    @SalaryTableColumn(column = "paymentType", width = "10%", text = "缴纳类型", transmethod = "com.engine.salary.transmethod.SISchemeTransMethod.getPaymentType")
    private String paymentType;


    /**
     * 方案id
     */
    @SalaryTableColumn(column = "insurance_id", text = "方案id",display = false)
    private String insuranceId;


    /**
     * 福利名称
     */
    @SalaryTableColumn(column = "insurance_name", width = "30%", text = "福利名称")
    private String insuranceName;

    /**
     * 方案名称
     */
    @SalaryTableColumn(column = "remarks", width = "30%", text = "备注")
    private String remarks;


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