123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel.DataAnnotations;
- using System.Text;
- using TEAMModelOS.SDK.DI;
- namespace TEAMModelOS.SDK.Models
- {
- public class GroupList : CosmosEntity
- {
- public GroupList()
- {
- pk = "GroupList";
- }
- public string name { get; set; }
- //标记该名单唯一code
- public string no { get; set; }
- public string periodId { get; set; }
- //课程id,需要标记则标记
- //public string courseId { get; set; }
- public string scope { get; set; }
- public string school { get; set; }
- public string creatorId { get; set; }
- /// <summary>
- ///教学班teach ,行政班(学生搜寻classId动态返回)class ,教研组research,学科组(学科搜寻动态返回)subject,好友friend,管理manage,群组group等,"activity"
- /// </summary>
- public string type { get; set; } = "teach";
- /// <summary>
- /// 名单过期时间。
- /// </summary>
- public long expire { get; set; } = 0;
- public int year { get; set; }
- /// <summary>
- /// 醍摩豆id成员数量
- /// </summary>
- public int tcount { get; set; }
- /// <summary>
- /// 校内账号成员数量
- /// </summary>
- public int scount { get; set; }
- public List<Member> members { get; set; } = new List<Member>();
- public string leader { get; set; }
- /// <summary>
- /// 名单创建来源,0 默认,1 个人 ,2 学校,3 校内应用,4企业应用
- /// </summary>
- public int froms { get; set; } = 0;
- /// <summary>
- /// 个人名单是否开放 加入。0 不允许,1 允许。
- /// </summary>
- public int joinLock { get; set; } = 1;
- /// <summary>
- /// 是否开启审核,0未开启,1开启。
- /// </summary>
- public int review { get; set; } = 0;
- /// <summary>
- /// 加入人数200人,学生加入已满200 自动关闭加入。可手动解除限制,开启审核时,关闭人数上限设置机制
- /// </summary>
- public int limitCount { get; set; } = 200;
- /// <summary>
- /// 二维码 天数
- /// </summary>
- public int qrcodeDays { get; set; } = 1;
- /// <summary>
- /// 二维码过期时间
- /// </summary>
- public long qrcodeExpire { get; set; }
- //名单中包含校内学生的入学年
- public HashSet<int> grades { get; set; } = new HashSet<int>();
- }
- public class RGroupList
- {
- public string id { get; set; }
- public string code { get; set; }
- public string pk { get; set; }
- public int? ttl { get; set; } = -1;
- public RGroupList()
- {
- pk = "GroupList";
- }
- public string name { get; set; }
- //标记该名单唯一code
- public string no { get; set; }
- public string periodId { get; set; }
- //课程id,需要标记则标记
- //public string courseId { get; set; }
- public string scope { get; set; }
- public string school { get; set; }
- public string creatorId { get; set; }
- /// <summary>
- ///研修培训名单,yxtrain 教学班teach ,行政班(学生搜寻classId动态返回)class ,教研组research,学科组(学科搜寻动态返回)subject,好友friend,管理manage,群组group等,"activity",
- ///TeacherAll 全体教师,StudentAll全体学生 TchStuAll,全体师生 动态返回
- /// </summary>
- public string type { get; set; } = "teach";
- public int year { get; set; }
- /// <summary>
- /// 名单过期时间。
- /// </summary>
- public long expire { get; set; } = 0;
- /// <summary>
- /// 醍摩豆id成员数量
- /// </summary>
- public int tcount { get; set; }
- /// <summary>
- /// 校内账号成员数量
- /// </summary>
- public int scount { get; set; }
- public List<RMember> members { get; set; } = new List<RMember>();
- public string leader { get; set; }
- public int froms { get; set; } = 0;
- /// <summary>
- /// 个人名单是否开放 加入。0 不允许,1 允许。
- /// </summary>
- public int joinLock { get; set; } = 1;
- /// <summary>
- ///补充毕业0在校,1毕业
- /// </summary>
- public int graduate { get; set; } = 0;
- /// <summary>
- /// 是否开启审核,0未开启,1开启。
- /// </summary>
- public int review { get; set; } = 0;
- /// <summary>
- /// 加入人数200人,学生加入已满200 自动关闭加入。可手动解除限制,开启审核时,关闭人数上限设置机制
- /// </summary>
- public int limitCount { get; set; } = 200;
- /// <summary>
- /// 二维码过期时间
- /// </summary>
- public long qrcodeExpire { get; set; }
- /// <summary>
- /// 二维码 天数
- /// </summary>
- public int qrcodeDays { get; set; }
- public HashSet<int> grades { get; set; } = new HashSet<int>();
- }
- public class Member
- {
- /// <summary>
- /// 账号id
- /// </summary>
- [Required(ErrorMessage = "{0} 名单的ID 必须填写")]
- public string id { get; set; }
- //学生所在的学校
- public string code { get; set; }
- /// <summary>
- ///类型 1 tmdid,2 student
- /// </summary>
- [Range(1, 2)]
- public int type { get; set; }
- /// <summary>
- ///座号
- /// </summary>
- public string no { get; set; }
- /// <summary>
- /// IRS WebIRS编号。
- /// </summary>
- public string irs { get; set; }
- public string tag { get; set; }
- public string groupId { get; set; }
- public string groupName { get; set; }
- public string nickname { get; set; }
- //补充毕业
- //0在校,1毕业
- public int graduate { get; set; } = 0;
- public int year { get; set; }= 0;
- public string gender { get; set; }
- }
- /// <summary>
- /// 活动结束后的结算接结构
- /// </summary>
- public class FMember
- {
- /// <summary>
- /// 账号id
- /// </summary>
- public string id { get; set; }
- /// <summary>
- /// 所在学校的学校id
- /// </summary>
- public string code { get; set; }
- /// <summary>
- /// 账户类型
- /// </summary>
- public int type { get; set; }
- /// <summary>
- /// 分组id
- /// </summary>
- public string groupId { get; set; }
- /// <summary>
- /// 分组名称
- /// </summary>
- public string groupName { get; set; }
- }
- public class RMember
- {
- /// <summary>
- /// 账号id
- /// </summary>
- public string id { get; set; }
- //学生所在的学校
- public string code { get; set; }
- //兼容HiTeach 需要的字段
- public string schoolId { get => code; }
-
- //学生所在的学校
- public string schoolName { get; set; }
- /// <summary>
- /// 名称
- /// </summary>
- public string name { get; set; }
- /// <summary>
- ///类型 1 tmdid,2 student
- /// </summary>
- public int type { get; set; }
- /// <summary>
- /// 头像
- /// </summary>
- public string picture { get; set; }
- /// <summary>
- /// 性别 M( male,男) F (female 女) N(secret 保密)
- /// </summary>
- public string gender { get; set; }
- /// <summary>
- ///座号
- /// </summary>
- public string no { get; set; }
- /// <summary>
- /// IRS WebIRS编号。
- /// </summary>
- public string irs { get; set; }
- public string tag { get; set; }
- /// <summary>
- /// 行政班
- /// </summary>
- public string classId { get; set; }
- /// <summary>
- /// 名单分组id
- /// </summary>
- public string groupId { get; set; }
- /// <summary>
- /// 名单分组名称
- /// </summary>
- public string groupName { get; set; }
- public string nickname { get; set; }
- //补充毕业
- //0在校,1毕业
- public int graduate { get; set; } = 0;
- //所在名单集合
- public List<string> groupListIds { get; set; } = new List<string>();
- public int year { get; set; }
- public string periodId { get; set; }
- }
- public class GroupListGrp
- {
- public GroupListGrp() { }
- public GroupListGrp(GroupList groupList, HashSet<string> groupName)
- {
- this.id = groupList.id;
- this.code = groupList.code;
- this.periodId = groupList.periodId;
- this.pk = groupList.pk;
- this.name = groupList.name;
- this.school = groupList.school;
- this.creatorId = groupList.creatorId;
- this.no = groupList.no;
- this.scope = groupList.scope;
- this.type = groupList.type;
- this.scount = groupList.scount;
- this.tcount = groupList.tcount;
- this.leader = groupList.leader;
- this.year = groupList.year;
- this.expire = groupList.expire;
- this.groupName = groupName;
- this.froms = groupList.froms;
- this.joinLock = groupList.joinLock;
- this.qrcodeExpire = groupList.qrcodeExpire;
- this.qrcodeDays = groupList.qrcodeDays;
- this.review=groupList.review;
- this.limitCount = groupList.limitCount;
- this.grades = groupList.grades;
- }
- public GroupListGrp(RGroupList groupList, HashSet<string> groupName)
- {
- this.id = groupList.id;
- this.code = groupList.code;
- this.periodId = groupList.periodId;
- this.pk = groupList.pk;
- this.name = groupList.name;
- this.school = groupList.school;
- this.creatorId = groupList.creatorId;
- this.no = groupList.no;
- this.scope = groupList.scope;
- this.type = groupList.type;
- this.scount = groupList.scount;
- this.tcount = groupList.tcount;
- this.leader = groupList.leader;
- this.year = groupList.year;
- this.expire = groupList.expire;
- this.groupName = groupName;
- this.froms = groupList.froms;
- this.joinLock = groupList.joinLock;
- this.qrcodeExpire = groupList.qrcodeExpire;
- this.qrcodeDays = groupList.qrcodeDays;
- this.review=groupList.review;
- this.limitCount = groupList.limitCount;
- this.grades = groupList.grades;
- }
- public string teachType { get; set; }
- public string pk { get; set; }
- public string id { get; set; }
- public string code { get; set; }
- public string name { get; set; }
- //标记该名单唯一code
- public string no { get; set; }
- public string periodId { get; set; }
- //课程id,需要标记则标记
- //public string courseId { get; set; }
- public string scope { get; set; }
- public string school { get; set; }
- public string creatorId { get; set; }
- /// <summary>
- ///教学班teach ,行政班(学生搜寻classId动态返回)class ,教研组research,学科组(学科搜寻动态返回)subject,好友friend,管理manage,群组group等
- /// </summary>
- public string type { get; set; } = "teach";
- public int year { get; set; }
- public long expire { get; set; }
- /// <summary>
- /// 醍摩豆id成员数量
- /// </summary>
- public int tcount { get; set; }
- /// <summary>
- /// 校内账号成员数量
- /// </summary>
- public int scount { get; set; }
- public string leader { get; set; }
- public HashSet<string> groupName { get; set; }
- public int froms { get; set; } = 0;
- /// <summary>
- /// 个人名单是否开放 加入。0 不允许,1 允许。
- /// </summary>
- public int joinLock { get; set; } =1;
- /// <summary>
- /// 是否开启审核,0未开启,1开启。
- /// </summary>
- public int review { get; set; } = 0;
- /// <summary>
- /// 加入人数200人,学生加入已满200 自动关闭加入。可手动解除限制,开启审核时,关闭人数上限设置机制
- /// </summary>
- public int limitCount { get; set; } = 200;
- /// <summary>
- /// 二维码过期时间
- /// </summary>
- public long qrcodeExpire { get; set; }
- /// <summary>
- /// 二维码 天数
- /// </summary>
- public int qrcodeDays { get; set; }
- //补充毕业
- //0在校,1毕业
- public int graduate { get; set; } = 0;
- public HashSet<int> grades { get; set; } = new HashSet<int>();
- }
- public class GroupListDtoImpt {
- public List<GroupListDto> groupLists { get; set; } = new List<GroupListDto>();
- }
- public class GroupListDto
- {
- public GroupListDto() { }
- public GroupListDto(RGroupList groupList) {
- this.id = groupList.id;
- this.code = groupList.code;
- this.periodId = groupList.periodId;
- this.pk = groupList.pk;
- this.name = groupList.name;
- this.school = groupList.school;
- this.creatorId = groupList.creatorId;
- this.no = groupList.no;
- this.scope = groupList.scope;
- this.type = groupList.type;
- this.scount = groupList.scount;
- this.tcount = groupList.tcount;
- this.leader = groupList.leader;
- this.year = groupList.year;
- this.expire = groupList.expire;
- this.froms = groupList.froms;
- this.joinLock = groupList.joinLock;
- this.qrcodeExpire = groupList.qrcodeExpire;
- this.qrcodeDays = groupList.qrcodeDays;
- this.review=groupList.review;
- this.limitCount = groupList.limitCount;
- this.grades = groupList.grades;
- this.graduate = groupList.graduate;
- }
- public string pk { get; set; }
- public string id { get; set; }
-
- public string code { get; set; }
- [Required(ErrorMessage = "{0} 名单的名称必须填写")]
- public string name { get; set; }
- //标记该名单唯一code
- public string no { get; set; }
- [Required(ErrorMessage = "{0} 名单的学段必须填写")]
- public string periodId { get; set; }
- //课程id,需要标记则标记
- //public string courseId { get; set; }
- public string scope { get; set; }
- public string school { get; set; }
- public string creatorId { get; set; }
- /// <summary>
- ///教学班teach ,行政班(学生搜寻classId动态返回)class ,教研组research,学科组(学科搜寻动态返回)subject,好友friend,管理manage,群组group等
- /// </summary>
- public string type { get; set; } = "teach";
- [Range(2000, 3000)]
- public int year { get; set; }
- /// <summary>
- /// 醍摩豆id成员数量
- /// </summary>
- public int tcount { get; set; }
- /// <summary>
- /// 校内账号成员数量
- /// </summary>
- public int scount { get; set; }
- public string leader { get; set; }
- public int froms { get; set; } = 0;
- /// <summary>
- /// 个人名单是否开放 加入。0 不允许,1 允许。
- /// </summary>
- public int joinLock { get; set; } = 1;
- /// <summary>
- /// 是否开启审核,0未开启,1开启。
- /// </summary>
- public int review { get; set; } = 0;
- /// <summary>
- /// 加入人数200人,学生加入已满200 自动关闭加入。可手动解除限制,开启审核时,关闭人数上限设置机制
- /// </summary>
- public int limitCount { get; set; } = 200;
- /// <summary>
- /// 二维码过期时间
- /// </summary>
- public long qrcodeExpire { get; set; }
- /// <summary>
- /// 二维码 天数
- /// </summary>
- public int qrcodeDays { get; set; }
- //0在校,1毕业
- public int graduate { get; set; } = 0;
- public long expire { get; set; } = 0;
- public HashSet<int> grades { get; set; } = new HashSet<int>();
- }
- public class CourseGroupList
- {
- public string scope { get; set; }
- public string subject { get; set; }
- public string period { get; set; }
- public string subjectId { get; set; }
- public string periodId { get; set; }
- public string name { get; set; }
- public string id { get; set; }
- public List<GroupListGrp> groups { get; set; } = new List<GroupListGrp>();
- }
- public class TeachCourse
- {
- public string scope { get; set; }
- public IdNameCode subject { get; set; }
- public IdNameCode period { get; set; }
- public string name { get; set; }
- public string id { get; set; }
- public TeachSchedule schedule { get; set; }
- }
- public class TeachSchedule
- {
- public string classId { get; set; }
- public string stulist { get; set; }
- public string teacherId { get; set; }
- }
- public class IdNameCode
- {
- public string id { get; set; }
- public string name { get; set; }
- public string code { get; set; }
- public string picture { get; set; }
- public string nickname { get; set; }
- }
- public class GroupListSemester:CosmosEntity
- {
- //id 学年-学期-id
- //code GroupListSemester-hbcn
- public GroupListSemester()
- {
- pk = "GroupListSemester";
- }
- public string groupListId { get; set; }
- public string semesterId { get; set; }
- public int studyYear { get; set; }
- public string name { get; set; }
- //标记该名单唯一code
- public string no { get; set; }
- public string periodId { get; set; }
- //课程id,需要标记则标记
- //public string courseId { get; set; }
- public string scope { get; set; }
- public string school { get; set; }
- public string creatorId { get; set; }
- /// <summary>
- ///研修培训名单,yxtrain 教学班teach ,行政班(学生搜寻classId动态返回)class ,教研组research,学科组(学科搜寻动态返回)subject,好友friend,管理manage,群组group等,"activity",
- ///TeacherAll 全体教师,StudentAll全体学生 TchStuAll,全体师生 动态返回
- /// </summary>
- public string type { get; set; } = "teach";
- public int year { get; set; }
- /// <summary>
- /// 名单过期时间。
- /// </summary>
- public long expire { get; set; } = 0;
- /// <summary>
- /// 醍摩豆id成员数量
- /// </summary>
- public int tcount { get; set; }
- /// <summary>
- /// 校内账号成员数量
- /// </summary>
- public int scount { get; set; }
- public List<RMember> members { get; set; } = new List<RMember>();
- public string leader { get; set; }
- public int froms { get; set; } = 0;
- /// <summary>
- /// 个人名单是否开放 加入。0 不允许,1 允许。
- /// </summary>
- public int joinLock { get; set; } = 1;
- /// <summary>
- ///补充毕业0在校,1毕业
- /// </summary>
- public int graduate { get; set; } = 0;
- /// <summary>
- /// 是否开启审核,0未开启,1开启。
- /// </summary>
- public int review { get; set; } = 0;
- /// <summary>
- /// 加入人数200人,学生加入已满200 自动关闭加入。可手动解除限制,开启审核时,关闭人数上限设置机制
- /// </summary>
- public int limitCount { get; set; } = 200;
- /// <summary>
- /// 二维码过期时间
- /// </summary>
- public long qrcodeExpire { get; set; }
- /// <summary>
- /// 二维码 天数
- /// </summary>
- public int qrcodeDays { get; set; }
- public HashSet<int> grades { get; set; } = new HashSet<int>();
- }
- }
|