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

import com.zhongshu.card.client.type.school.CardState;
import com.zhongshu.card.client.type.school.CardType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * @author TRX
 * @date 2024/6/13
 */
@Data
public class CardInfoStoreModel {

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

    @Schema(description = "所属项目oid")
    private String projectOid;

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

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

    @Schema(description = "卡片号码")
    private String code;

    @Schema(description = "卡片状态")
    private CardState cardState;

    private String cardStateStr;

    public String getCardStateStr() {
        if (cardState != null) {
            return cardState.getRemark();
        }
        return "";
    }

    @Schema(description = "所属用户UserId")
    private String userId;

    @Schema(description = "学校oid")
    private String schoolOid;

    @Schema(description = "是否作废")
    private Boolean isCanceled = Boolean.FALSE;

    @Schema(description = "作废时间")
    private Long cancelTime;

    @Schema(description = "作废用户userId")
    private String cancelUserId;
}
