using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
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; }
///
///教学班teach ,行政班(学生搜寻classId动态返回)class ,教研组research,学科组(学科搜寻动态返回)subject,好友friend,管理manage,群组group等,"activity"
///
public string type { get; set; } = "teach";
///
/// 名单过期时间。
///
public long expire { get; set; } = 0;
public int year { get; set; }
///
/// 醍摩豆id成员数量
///
public int tcount { get; set; }
///
/// 校内账号成员数量
///
public int scount { get; set; }
public List members { get; set; } = new List();
public string leader { get; set; }
///
/// 名单创建来源,0 默认,1 个人 ,2 学校,3 校内应用,4企业应用
///
public int froms { get; set; } = 0;
///
/// 个人名单是否开放 加入。0 不允许,1 允许。
///
public int joinLock { get; set; } = 1;
}
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; }
///
///研修培训名单,yxtrain 教学班teach ,行政班(学生搜寻classId动态返回)class ,教研组research,学科组(学科搜寻动态返回)subject,好友friend,管理manage,群组group等,"activity",
///TeacherAll 全体教师,StudentAll全体学生 TchStuAll,全体师生 动态返回
///
public string type { get; set; } = "teach";
public int year { get; set; }
///
/// 名单过期时间。
///
public long expire { get; set; } = 0;
///
/// 醍摩豆id成员数量
///
public int tcount { get; set; }
///
/// 校内账号成员数量
///
public int scount { get; set; }
public List members { get; set; } = new List();
public string leader { get; set; }
public int froms { get; set; } = 0;
///
/// 个人名单是否开放 加入。0 不允许,1 允许。
///
public int joinLock { get; set; } = 1;
///
///补充毕业0在校,1毕业
///
public int graduate { get; set; } = 0;
}
public class Member
{
///
/// 账号id
///
[Required(ErrorMessage = "{0} 名单的ID 必须填写")]
public string id { get; set; }
//学生所在的学校
public string code { get; set; }
///
///类型 1 tmdid,2 student
///
[Range(1, 2)]
public int type { get; set; }
///
///座号
///
public string no { get; set; }
///
/// IRS WebIRS编号。
///
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 class FMember
{
///
/// 账号id
///
public string id { get; set; }
///
/// 所在学校的学校id
///
public string code { get; set; }
///
/// 账户类型
///
public int type { get; set; }
///
/// 分组id
///
public string groupId { get; set; }
///
/// 分组名称
///
public string groupName { get; set; }
}
public class RMember
{
///
/// 账号id
///
public string id { get; set; }
//学生所在的学校
public string code { get; set; }
//兼容HiTeach 需要的字段
public string schoolId { get => code; }
//学生所在的学校
public string schoolName { get; set; }
///
/// 名称
///
public string name { get; set; }
///
///类型 1 tmdid,2 student
///
public int type { get; set; }
///
/// 头像
///
public string picture { get; set; }
///
///座号
///
public string no { get; set; }
///
/// IRS WebIRS编号。
///
public string irs { get; set; }
public string tag { get; set; }
///
/// 行政班
///
public string classId { get; set; }
///
/// 名单分组id
///
public string groupId { get; set; }
///
/// 名单分组名称
///
public string groupName { get; set; }
public string nickname { get; set; }
//补充毕业
//0在校,1毕业
public int graduate { get; set; } = 0;
}
public class GroupListGrp
{
public GroupListGrp() { }
public GroupListGrp(GroupList groupList, HashSet 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;
}
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; }
///
///教学班teach ,行政班(学生搜寻classId动态返回)class ,教研组research,学科组(学科搜寻动态返回)subject,好友friend,管理manage,群组group等
///
public string type { get; set; } = "teach";
public int year { get; set; }
public long expire { get; set; }
///
/// 醍摩豆id成员数量
///
public int tcount { get; set; }
///
/// 校内账号成员数量
///
public int scount { get; set; }
public string leader { get; set; }
public HashSet groupName { get; set; }
public int froms { get; set; } = 0;
///
/// 个人名单是否开放 加入。0 不允许,1 允许。
///
public int joinLock { get; set; } =1;
//补充毕业
//0在校,1毕业
public int graduate { get; set; } = 0;
}
public class GroupListDtoImpt {
public List groupLists { get; set; } = new List();
}
public class GroupListDto
{
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; }
///
///教学班teach ,行政班(学生搜寻classId动态返回)class ,教研组research,学科组(学科搜寻动态返回)subject,好友friend,管理manage,群组group等
///
public string type { get; set; } = "teach";
[Range(2000, 3000)]
public int year { get; set; }
///
/// 醍摩豆id成员数量
///
public int tcount { get; set; }
///
/// 校内账号成员数量
///
public int scount { get; set; }
public string leader { get; set; }
public int froms { get; set; } = 0;
///
/// 个人名单是否开放 加入。0 不允许,1 允许。
///
public int joinLock { get; set; } = 1;
//0在校,1毕业
public int graduate { get; set; } = 0;
public long expire { get; set; } = 0;
}
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 groups { get; set; } = new List();
}
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; }
}
}