|
@@ -5,9 +5,11 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
|
import com.baomidou.mybatisplus.annotation.TableId;
|
|
import com.baomidou.mybatisplus.annotation.TableId;
|
|
import com.baomidou.mybatisplus.annotation.TableName;
|
|
import com.baomidou.mybatisplus.annotation.TableName;
|
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
|
|
|
+import com.ym.mec.common.enums.BaseEnum;
|
|
import java.io.Serializable;
|
|
import java.io.Serializable;
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
import java.sql.Time;
|
|
import java.sql.Time;
|
|
|
|
+import java.util.Arrays;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -23,6 +25,43 @@ public class CourseSchedule extends Model<CourseSchedule> {
|
|
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
|
|
|
|
+ public enum CourseScheduleType implements BaseEnum<String, CourseScheduleType> {
|
|
|
|
+
|
|
|
|
+ SINGLE("SINGLE", "单技课"), MIX("MIX", "合奏课"), HIGH("HIGH", "小班课"), VIP("VIP", "vip课"), DEMO("demo", "试听课"), COMPREHENSIVE("comprehensive", "综合课"), PRACTICE(
|
|
|
|
+ "PRACTICE", "练习课"), ENLIGHTENMENT("ENLIGHTENMENT", "启蒙课"), TRAINING("TRAINING", "集训课");
|
|
|
|
+
|
|
|
|
+ private String code;
|
|
|
|
+
|
|
|
|
+ private String msg;
|
|
|
|
+
|
|
|
|
+ CourseScheduleType(String code, String msg) {
|
|
|
|
+ this.code = code;
|
|
|
|
+ this.msg = msg;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public String getCode() {
|
|
|
|
+ return code;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public String getMsg() {
|
|
|
|
+ return msg;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 根据枚举值获取枚举信息
|
|
|
|
+ *
|
|
|
|
+ * @param code 枚举值
|
|
|
|
+ * @return 枚举信息
|
|
|
|
+ */
|
|
|
|
+ public static String getMsgByCode(String code) {
|
|
|
|
+ return Arrays.stream(CourseScheduleType.values())
|
|
|
|
+ .filter(StudentAttendanceStatusEnum -> StudentAttendanceStatusEnum.getCode().equals(code))
|
|
|
|
+ .findFirst()
|
|
|
|
+ .map(CourseScheduleType::getMsg).orElse(null);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
@TableId(value = "id_", type = IdType.AUTO)
|
|
@TableId(value = "id_", type = IdType.AUTO)
|
|
private Long id;
|
|
private Long id;
|
|
/**
|
|
/**
|
|
@@ -79,7 +118,16 @@ public class CourseSchedule extends Model<CourseSchedule> {
|
|
*/
|
|
*/
|
|
@TableField("complaint_status_")
|
|
@TableField("complaint_status_")
|
|
private String complaintStatus;
|
|
private String complaintStatus;
|
|
-
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 课程类型(单技课、小班课、合奏课、综合课、练习课、启蒙课、集训课、VIP课、试听课)
|
|
|
|
+ */
|
|
|
|
+ @TableField("type_")
|
|
|
|
+ private String type;
|
|
|
|
+ /**
|
|
|
|
+ * 课程名
|
|
|
|
+ */
|
|
|
|
+ @TableField("name_")
|
|
|
|
+ private String name;
|
|
|
|
|
|
public Long getId() {
|
|
public Long getId() {
|
|
return id;
|
|
return id;
|
|
@@ -198,6 +246,22 @@ public class CourseSchedule extends Model<CourseSchedule> {
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public String getType() {
|
|
|
|
+ return type;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void setType(String type) {
|
|
|
|
+ this.type = type;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public String getName() {
|
|
|
|
+ return name;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void setName(String name) {
|
|
|
|
+ this.name = name;
|
|
|
|
+ }
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
protected Serializable pkVal() {
|
|
protected Serializable pkVal() {
|
|
return this.id;
|
|
return this.id;
|
|
@@ -206,19 +270,21 @@ public class CourseSchedule extends Model<CourseSchedule> {
|
|
@Override
|
|
@Override
|
|
public String toString() {
|
|
public String toString() {
|
|
return "CourseSchedule{" +
|
|
return "CourseSchedule{" +
|
|
- ", id=" + id +
|
|
|
|
- ", classGroupId=" + classGroupId +
|
|
|
|
- ", status=" + status +
|
|
|
|
- ", subsidy=" + subsidy +
|
|
|
|
- ", classDate=" + classDate +
|
|
|
|
- ", startClassTime=" + startClassTime +
|
|
|
|
- ", endClassTime=" + endClassTime +
|
|
|
|
- ", teacherId=" + teacherId +
|
|
|
|
- ", actualTeacherId=" + actualTeacherId +
|
|
|
|
- ", createTime=" + createTime +
|
|
|
|
- ", updateTime=" + updateTime +
|
|
|
|
- ", teachMode=" + teachMode +
|
|
|
|
- ", complaintStatus=" + complaintStatus +
|
|
|
|
- "}";
|
|
|
|
|
|
+ "id=" + id +
|
|
|
|
+ ", classGroupId=" + classGroupId +
|
|
|
|
+ ", status='" + status + '\'' +
|
|
|
|
+ ", subsidy=" + subsidy +
|
|
|
|
+ ", classDate=" + classDate +
|
|
|
|
+ ", startClassTime=" + startClassTime +
|
|
|
|
+ ", endClassTime=" + endClassTime +
|
|
|
|
+ ", teacherId=" + teacherId +
|
|
|
|
+ ", actualTeacherId=" + actualTeacherId +
|
|
|
|
+ ", createTime=" + createTime +
|
|
|
|
+ ", updateTime=" + updateTime +
|
|
|
|
+ ", teachMode='" + teachMode + '\'' +
|
|
|
|
+ ", complaintStatus='" + complaintStatus + '\'' +
|
|
|
|
+ ", type='" + type + '\'' +
|
|
|
|
+ ", name='" + name + '\'' +
|
|
|
|
+ '}';
|
|
}
|
|
}
|
|
}
|
|
}
|