package com.qmth.qrzk.repository.user.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.qmth.qrzk.repository.pager.model.SkelCfg;
import com.qmth.qrzk.repository.utils.Consts;


/**
 * 课程实体类
 * @author 钟辉
 *
 */
public class Course {

	private Integer id;				//编号
	
	private String code;			//课程代码
	
	private String codeHubei;		//课程省编代码
	
	private String name;			//课程名称
	
	private Double score;			//课程学分
	
	private Integer type;			//课程类型:0：省考 1：统考
	
	private Integer status;			//课程状态
	
	private Integer openEdit;		//是否开放编辑，如果为1，表示录入员可以强制修改此课程的所有试题
	
	private String remark;			//备注
	
	private Date updateDate;	//最后更新时间
	
	private List<QuestionType> quesTypeList;	//对应的题型列表
	
	private SkelCfg skelCfg;	//对应的细目表配置数据
	
	private String guid;
	
	public String getGuid() {
		return guid;
	}
	public void setGuid(String guid) {
		this.guid = guid;
	}
	
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getCodeHubei() {
		return codeHubei;
	}

	public void setCodeHubei(String codeHubei) {
		this.codeHubei = codeHubei;
	}

	public String getName() {
		return name;
	}
	
	public String getShowName(){
		return code + "-" + name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Double getScore() {
		return score;
	}

	public void setScore(Double score) {
		this.score = score;
	}


	public String getRemark() {
		return remark;
	}

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

	public Integer getStatus() {
		return status;
	}
	
	public String getStatusName(){
		return Consts.CourseStatus.dicMap.get(status);
	}

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

	public Integer getId() {
		return id;
	}

	public Integer getType() {
		return type;
	}
	
	public String getTypeName(){
		return Consts.CourseType.dicMap.get(type);
	}

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

	public void setId(Integer id) {
		this.id = id;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public List<QuestionType> getQuesTypeList() {
		if(quesTypeList == null){
			quesTypeList = new ArrayList<QuestionType>();
		}
		return quesTypeList;
	}

	public void setQuesTypeList(List<QuestionType> quesTypeList) {
		this.quesTypeList = quesTypeList;
	}
	
	public SkelCfg getSkelCfg() {
		return skelCfg;
	}
	
	public void setSkelCfg(SkelCfg skelCfg) {
		this.skelCfg = skelCfg;
	}
	
	public Integer getOpenEdit() {
		return openEdit;
	}
	
	public void setOpenEdit(Integer openEdit) {
		this.openEdit = openEdit;
	}
	
}
