package com.yihu.jw.entity.care.course;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: yeshijie
 * @Date: 2021/5/10
 * @Description: 课程表
 */
@Entity
@Table(name="base_course")
public class CourseDO extends UuidIdentityEntityWithOperator {

    /**
     * '课程类型'
     */
    private String type;
    private String typeName;
    /**
     * '课程名称'
     */
    private String name;
    /**
     * 机构id
     */
    private String orgCode;
    /**
     * 机构名称
     */
    private String orgName;
    /**
     *'教师id'
     */
    private String doctor;
    /**
     *'教师名称'
     */
    private String doctorName;
    /**
     * '直播时间'
     */
    private Date liveTime;
    /**
     * 直播状态
     */
    private String liveStatus;
    private String liveStatusName;
    /**
     * 直播时长
     */
    private String liveDuration;

    /**
     * 上架状态
     */
    private String status;
    private String statusName;

    /**
     * '课程封面'
     */
    private String courseCover;
    /**
     * '费用'
     */
    private BigDecimal fee;
    /**
     * '课程简介'
     */
    private String introduction;

    /**
     * `删除标志 1正常 0删除',
     */
    private Integer del;

    /**
     * 小节
     */
    List<CourseCatalogueDO> catalogueDOList;

    @Column(name = "type")
    public String getType() {
        return type;
    }

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

    @Transient
    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    @Column(name = "name")
    public String getName() {
        return name;
    }

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

    @Column(name = "org_code")
    public String getOrgCode() {
        return orgCode;
    }

    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }

    @Column(name = "org_name")
    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    @Column(name = "doctor")
    public String getDoctor() {
        return doctor;
    }

    public void setDoctor(String doctor) {
        this.doctor = doctor;
    }

    @Column(name = "doctor_name")
    public String getDoctorName() {
        return doctorName;
    }

    public void setDoctorName(String doctorName) {
        this.doctorName = doctorName;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    @Column(name = "live_time")
    public Date getLiveTime() {
        return liveTime;
    }

    public void setLiveTime(Date liveTime) {
        this.liveTime = liveTime;
    }

    @Column(name = "course_cover")
    public String getCourseCover() {
        return courseCover;
    }

    public void setCourseCover(String courseCover) {
        this.courseCover = courseCover;
    }

    @Column(name = "fee")
    public BigDecimal getFee() {
        return fee;
    }

    public void setFee(BigDecimal fee) {
        this.fee = fee;
    }

    @Column(name = "introduction")
    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    @Column(name = "live_status")
    public String getLiveStatus() {
        return liveStatus;
    }

    public void setLiveStatus(String liveStatus) {
        this.liveStatus = liveStatus;
    }

    @Column(name = "status")
    public String getStatus() {
        return status;
    }

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

    @Column(name = "del")
    public Integer getDel() {
        return del;
    }

    public void setDel(Integer del) {
        this.del = del;
    }

    @Transient
    public String getLiveStatusName() {
        return liveStatusName;
    }

    public void setLiveStatusName(String liveStatusName) {
        this.liveStatusName = liveStatusName;
    }

    @Transient
    public String getStatusName() {
        return statusName;
    }

    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }

    @Column(name = "live_duration")
    public String getLiveDuration() {
        return liveDuration;
    }

    public void setLiveDuration(String liveDuration) {
        this.liveDuration = liveDuration;
    }

    @Transient
    public List<CourseCatalogueDO> getCatalogueDOList() {
        return catalogueDOList;
    }

    public void setCatalogueDOList(List<CourseCatalogueDO> catalogueDOList) {
        this.catalogueDOList = catalogueDOList;
    }
}
