using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Text; using TEAMModelOS.SDK.Context.Attributes.Azure; namespace TEAMModelOS.SDK.Models { /// /// 课程 /// public class Course : CosmosEntity { public Course() { pk = "Course"; subject = new SubjectSimple(); period = new PeriodSimple(); schedule = new List(); } /// /// 课程名称 /// [Required(ErrorMessage = "{0} 必须填写")] public string name { get; set; } /// /// 课程编码 /// /* [Required(ErrorMessage = "{0} 必须填写")] public string courseCode { get; set; }*/ ///// ///// 学期编码 ///// //public string semesterCode { get; set; } /// /// 科目编码 /// public SubjectSimple subject { get; set; } /// /// 学段编码 /// public PeriodSimple period { get; set; } /// /// 任课教师范围 /// //public List teachers { get; set; } public string scope { get; set; } public string desc { get; set; } public List schedule { get; set; } //public List classes { get; set; } public string no { get; set; } ///新增字段 /// /// 创建者的id /// public string creatorId { get; set; } /// /// 学校编码或教师tmdid /// [Required(ErrorMessage = "school 必须设置")] public string school { get; set; } //哪一学年的课程 public int year { get; set; } } public class Schedule { /// /// 教室 /// public string room { get; set; } /// /// 班级名单id /// public string classId { get; set; } [Required(ErrorMessage = "教师id {0} 必须填写")] public string teacherId { get; set; } /// /// 自定义名单 /// public string stulist { get; set; } public List time { get; set; } = new List(); } public class ScheduleTimeDto { public string courseId { get; set; } /// /// 教室 /// public string roomId { get; set; } /// /// 班级名单id /// public string classId { get; set; } public string teacherId { get; set; } /// /// 自定义名单 /// public string stulist { get; set; } public string timeId { get; set; } public string week { get; set; } public string keyTeacher { get; set; }//teacherId_week_timeId public string keyGroupId { get; set; }//classId/stulist_week_timeId public string keyRoomIds { get; set; }//room_week_timeId } public class ScheduleNoTimeDto { public string courseId { get; set; } /// /// 教室 /// public string roomId { get; set; } /// /// 班级名单id /// public string classId { get; set; } public string teacherId { get; set; } /// /// 自定义名单 /// public string stulist { get; set; } } public class TimeInfo { public string id { get; set; } public string week { get; set; } //public string start { get; set; } //public string end { get; set; } } public class PeriodSimple { public string id { get; set; } public string name { get; set; } } public class SubjectSimple { public string id { get; set; } public string name { get; set; } } /* public class Info { public string id { get; set; } public string name { get; set; } }*/ public class Teachers { public string id { get; set; } public string name { get; set; } } public class CourseDtoImpt { public List courses { get; set; } = new List(); } public class CourseDto { public string id { get; set; } [Required(ErrorMessage = "{0} 课程的名称必须填写")] public string name { get; set; } public string desc { get; set; } public string no { get; set; } [Required(ErrorMessage = "{0} 课程的科目id必须填写"), RegularExpression(@"[0-9a-zA-Z]{8}(-[0-9a-zA-Z]{4}){3}-[0-9a-zA-Z]{12}",ErrorMessage ="科目的uuid格式错误!")] public string subjectId { get; set; } public string subjectName { get; set; } public string periodId { get; set; } } }