using Microsoft.Azure.Cosmos.Table; using System; using System.Collections.Generic; using System.Text; using TEAMModelOS.SDK.Models.Cosmos.Common; namespace TEAMModelOS.SDK.Models { /// /// 前端多语言处理 /// //public string title { get; set; } /// /// 前端多语言处理 /// //public string content { get; set; } /* { "title":"通知标题", "type":"通知类型", "level":"重要程度", "content":"通知内容", "data":"传输数据josn", "stime":"发起时间戳", "etime":"到期时间戳", "id":"通知id", "code":"发起人" "pk":"notice" } */ /// /// 通知主体存放位置:/notice/{业务id}.json /// 活跃通知放在CosmosDB Common表中,并设置"ttl":2592000,不能超过30天(2592000),一天(3600),一周(25200),允许删除 /// 过期通知存放至blob中,存放位置, 允许被删除,直接删除记录 /// stuid:/student/stuid/receiver/xxxx时间戳排序.json /// tmdid:/receiver/xxxx时间戳排序.json /// public class Notice { /// /// 訊息種類 message:訊息,收取會另存至儲存體(blob or table) notice:通知,收取後不另存 /// XXXX通知的业务类型,做什么事情用,具体业务类型再定义。 vote-join /// public string type { get; set; } /// /// 重要等级 emergency、high、normal、low 1置顶,2非常重要,3重要,4普通消息,5不重要 /// public string priority { get; set; } /// /// 發信源服務 IES5 /// public string from { get; set; } = "IES5"; /// /// 服務收信對象 若任一服務皆可收,則不填;指定某服務才收,則填服務名稱 例:HiT /// public string toservice { get; set; } /// /// 到期时间,发给接收者的cosmosDB ttl是从当前时间到结束时间为止 /// public long expire { get; set; } /// /// 创建时间 /// public long creation { get; set; } /// /// 消息id /// public string msgId { get; set; } /// /// 正文內容 /// public Body body { get; set; } /// /// 创建者 /// public string creatorId { get; set; } /// /// 源数据的学校编码 /// public string school { get; set; } /// /// 源数据的scope /// public string scope { get; set; } /// 通知主体的被通知人存放位置: /notice/{业务id}_receiver.json /// /// 被通知的醍摩豆账号 /// public List tmdids { get; set; } /// /// 被通知的学校学生账号 /// public List stuids { get; set; } } /// /// 传输数据josn /// public class Body { /// /// 业务类型 vote-join exam-join survey-join /// public string biztype { get; set; } /// /// 源数据的id /// public string sid { get; set; } /// /// 源数据的code /// public string scode { get; set; } /// /// 源数据的pk /// public string spk { get; set; } } /* { "id":"通知id" "code":"接收者1", "status":"接收状态/已发送/已查看", "pk":"receiver", "ttl":2592000,不能超过30天(2592000),一天(3600),一周(25200) } */ /// /// id :源数据id /// code:Receiver-{hbcn}-{rid} /// ttl :Notice的etime-当前时间戳 /// pk :Receiver /// /// /student/{stuid}/ public class Receiver { public string id { get; set; } /// /// 0 已发送,1已查看,2已处理,-1已过期 /// public int status { get; set; }=0; /// /// 创建时间 /// public long ctime { get; set; } /// /// 通知url /// public string urlNotice { get; set; } } }