package com.zhongshu.card.client.model.org.projectDict;

import com.zhongshu.card.client.model.base.SuperModel;
import com.zhongshu.card.client.type.DataState;
import com.zhongshu.card.client.type.project.ProjectDictType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author TRX
 * @date 2024/12/19
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ProjectDictModel extends SuperModel {

    @Schema(description = "字典类型")
    private ProjectDictType dictType;

    private String dictTypeStr;

    public String getDictTypeStr() {
        if (dictType != null) {
            return dictType.getRemark();
        }
        return "";
    }

    @Schema(description = "名称")
    private String name;

    @Schema(description = "编码")
    private String code;

    @Schema(description = "状态")
    private DataState state;

    private String stateStr;

    public String getStateStr() {
        if (state != null) {
            return state.getRemark();
        }
        return "";
    }

}
