using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Text; using TEAMModelOS.SDK.Models.Cosmos.Common; namespace TEAMModelOS.SDK.Models.Cosmos { /// /// 课纲-我喜欢的,我的收藏 /// public class Favorite : CosmosEntity { public Favorite() { pk = "Favorite"; ttl = -1; //code ="Favorite-tmdid" } public SyllabusTree node { get; set; } /// /// 名称 默认选中节点名称,或者自定义输入名称 /// public string name { get; set; } /// /// 创建时间 /// public long createTime { get; set; } /// /// 引用来源课纲id /// [Required(ErrorMessage = "引用来源课纲id 必须设置")] public string fromId { get; set; } /// /// 引用来源 课纲Code 分区键 /// [Required(ErrorMessage = "引用来源课纲code 必须设置")] public string fromCode { get; set; } } /* { "id":"课纲册别id", "code":"Share-接收者tmdid", "issuer":"分享者tmdid", "createTime":分享时间, "scode":"引用来源课纲册别code", "scope":"school/private", "school":"hbcn", "issuer":"颁发权限的id" } */ /// /// 主动分享给谁, 分享功能只会发生在个人课纲中 /// public class Share : CosmosEntity { public Share(){ pk = "Share"; } public string scode { get; set; } /// /// 权限颁发者 /// public string issuer { get; set; } public long createTime { get; set; } /// /// 学校编码或教师tmdid /// [Required(ErrorMessage = "school 必须设置")] public string school { get; set; } /// /// school|private /// [Required(ErrorMessage = "scope 必须设置")] public string scope { get; set; } /// /// 共编 /// public bool coedit { get; set; } /// /// 分享 /// public bool share { get; set; } /// /// 课纲名称 /// public string sname { get; set; } } /// /// 主动分享给谁,当接收者接收并完成相关资源复制后则删除本条数据。 /// public class ShareData { /// /// 学校编码 /// [Required(ErrorMessage = "school 必须设置")] public string school { get; set; } /// /// school|private /// [Required(ErrorMessage = "scope 必须设置")] public string scope { get; set; } /// /// add/edit/del /// [Required(ErrorMessage = "opt 必须设置")] public string opt { get; set; } [Required(ErrorMessage = "tmdid 必须设置")] public string tmdid { get; set; } /// /// tmdname /// public string name { get; set; } /// /// 课纲的id /// [Required(ErrorMessage = "sid 必须设置")] public string sid { get; set; } /// /// 课纲的分区键 /// [Required(ErrorMessage = "socde 必须设置")] public string scode { get; set; } /// /// 课纲的名称 /// [Required(ErrorMessage = "sname 必须设置")] public string sname { get; set; } /// /// 共编权限 /// public bool coedit { get; set; } = false; /// /// 分享权限 /// public bool share { get; set; } = false; /// /// 分享的节点 all 或者節點id /// public List snodes { get; set; } = new List(); /// /// 共编 分享权限颁发者 /// [Required(ErrorMessage = "issuer 必须设置")] public string issuer { get; set; } } }