package com.zhongshu.card.client.model.school;

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

/**
 * @author TRX
 * @date 2024/7/30
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CardInfoPoolSimpleModel {

    @Schema(description = "数据ID")
    private String id;

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

    @Schema(description = "卡片类型")
    private CardType cardType;

    private String cardTypeStr;

    public String getCardTypeStr() {
        if (cardType != null) {
            return cardType.getRemark();
        }
        return "";
    }

    @Schema(description = "卡片号码,唯一标识, 卡号")
    private String code;

    @Schema(description = "是否已使用")
    private Boolean isUsed = Boolean.FALSE;

    @Schema(description = "备注")
    private String remark;
}
