package com.engine.organization.entity.scheme.vo;

import com.cloudstore.eccom.pc.table.WeaTableType;
import com.engine.organization.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @description:
 * @author:dxfeng
 * @createTime: 2022/05/11
 * @version: 1.0
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@OrganizationTable(pageId = "1afe425c-d0f8-11ec-b80e-00ffcbed7508",
        fields = "t.id ," +
                " t.grade_no ," +
                " t.grade_name ," +
                " t.description ," +
                " a.scheme_name ," +
                " t.level_id ," +
                " t.forbidden_tag," +
                "t.is_used",
        fromSql = "from jcl_org_grade t inner join jcl_org_scheme a on t.scheme_id = a.id ",
        orderby = "grade_no",
        sortway = "asc",
        primarykey = "id",
        operates = {
                @OrganizationTableOperate(text = "编辑"),
                @OrganizationTableOperate(index = "1", text = "删除")
        },
        tableType = WeaTableType.CHECKBOX,
        operatePopedom = @OperatePopedom(transmethod = "com.engine.organization.util.ConfigTrans.formatSourceOperates", otherpara = "column:is_used"),
        checkboxPopedom = @CheckboxPopedom(showmethod = "com.engine.organization.util.ConfigTrans.getCheckBoxPopedom", popedompara = "column:is_used")

)
public class GradeTableVO {
    /**
     * 主键
     */
    @OrganizationTableColumn(column = "id", display = false)
    private Long id;
    /**
     * 是否被引用
     */
    @OrganizationTableColumn(column = "isUsed", display = false)
    private Integer isUsed;
    /**
     * 编号
     */
    @OrganizationTableColumn(text = "编号", width = "20%", column = "grade_no", orderkey = "grade_no")
    private String gradeNo;
    /**
     * 名称
     */
    @OrganizationTableColumn(text = "名称", width = "20%", column = "grade_name")
    private String gradeName;

    /**
     * 等级方案
     */
    private long schemeId;
    /**
     * 等级方案
     */
    @OrganizationTableColumn(text = "等级方案", width = "20%", column = "scheme_name")
    private String schemeName;
    /**
     * 职等
     */
    @OrganizationTableColumn(text = "职等", width = "20%", column = "level_id", transmethod = "com.engine.organization.transmethod.LevelTransMethod.getLevelId")
    private String levelId;

    /**
     * 描述说明
     */
    @OrganizationTableColumn(text = "描述说明", width = "30%", column = "description")
    private String description;
    /**
     * 禁用标记
     */
    @OrganizationTableColumn(text = "是否启用", width = "10%", column = "forbidden_tag")
    private int forbiddenTag;
}
