package com.qmth.distributed.print.business.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.distributed.print.business.enums.CardStatusEnum;
import com.qmth.distributed.print.business.enums.CardTypeEnum;
import com.qmth.distributed.print.business.enums.MakeMethodEnum;
import com.qmth.teachcloud.common.base.BaseEntity;
import com.qmth.teachcloud.common.entity.SysOrg;
import com.qmth.teachcloud.common.enums.CardCreateMethodEnum;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 题卡
 * </p>
 *
 * @author xf
 * @since 2021-03-23
 */
@TableName("exam_card")
public class ExamCard extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "学校id")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField("school_id")
    private Long schoolId;

    @ApiModelProperty(value = "机构id")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "org_id", updateStrategy = FieldStrategy.IGNORED)
    private Long orgId;

    /**
     * 课程编码
     */
    @TableField("course_code")
    private String courseCode;
    /**
     * 课程名称
     */
    @TableField("course_name")
    private String courseName;
    /**
     * 标题
     */
    private String title;
    /**
     * 题卡制作方式：SELECT-选择已有题卡，SELF-自助创建，CUST-客户制卡
     */
    @TableField("make_method")
    private MakeMethodEnum makeMethod;

    /**
     * STAGE-暂存，SUBMIT-提交
     */
    private CardStatusEnum status;

    /**
     * 题卡类型：GENERIC-通卡，CUSTOM-自定义
     */
    private CardTypeEnum type;

    /**
     * 通卡创建方式（UPLOAD-上传，CUSTOMIZE-自定义）
     */
    private CardCreateMethodEnum createMethod;

    @JsonSerialize(using = ToStringSerializer.class)
    @TableField("attachment_id")
    private Long attachmentId;

    @TableField("sync_status")
    private Boolean syncStatus;

    private Boolean enable;

    private String remark;

    @JsonSerialize(using = ToStringSerializer.class)
    @TableField("card_rule_id")
    private Long cardRuleId;

    @TableField(exist = false)
    private List<SysOrg> orgs;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Long getSchoolId() {
        return schoolId;
    }

    public void setSchoolId(Long schoolId) {
        this.schoolId = schoolId;
    }

    public Long getOrgId() {
        return orgId;
    }

    public void setOrgId(Long orgId) {
        this.orgId = orgId;
    }

    public String getCourseCode() {
        return courseCode;
    }

    public void setCourseCode(String courseCode) {
        this.courseCode = courseCode;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public MakeMethodEnum getMakeMethod() {
        return makeMethod;
    }

    public void setMakeMethod(MakeMethodEnum makeMethod) {
        this.makeMethod = makeMethod;
    }

    public CardStatusEnum getStatus() {
        return status;
    }

    public void setStatus(CardStatusEnum status) {
        this.status = status;
    }

    public CardTypeEnum getType() {
        return type;
    }

    public void setType(CardTypeEnum type) {
        this.type = type;
    }

    public Long getAttachmentId() {
        return attachmentId;
    }

    public void setAttachmentId(Long attachmentId) {
        this.attachmentId = attachmentId;
    }

    public Boolean getSyncStatus() {
        return syncStatus;
    }

    public void setSyncStatus(Boolean syncStatus) {
        this.syncStatus = syncStatus;
    }

    public CardCreateMethodEnum getCreateMethod() {
        return createMethod;
    }

    public void setCreateMethod(CardCreateMethodEnum createMethod) {
        this.createMethod = createMethod;
    }

    public Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Long getCardRuleId() {
        return cardRuleId;
    }

    public void setCardRuleId(Long cardRuleId) {
        this.cardRuleId = cardRuleId;
    }

    public List<SysOrg> getOrgs() {
        return orgs;
    }

    public void setOrgs(List<SysOrg> orgs) {
        this.orgs = orgs;
    }
}
