123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- using Microsoft.Azure.Cosmos.Table;
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace TEAMModelOS.SDK.Models.Table
- {
- /// <summary>
- /// 前端多语言处理
- /// </summary>
- //public string title { get; set; }
- /// <summary>
- /// 前端多语言处理
- /// </summary>
- //public string content { get; set; }
- /*
- {
- "title":"通知标题",
- "type":"通知类型",
- "level":"重要程度",
- "content":"通知内容",
- "data":"传输数据josn",
- "stime":"发起时间戳",
- "etime":"到期时间戳",
- "id":"通知id",
- "code":"发起人"
- "pk":"notice"
- }
- */
- /// <summary>
- /// 通知主体存放位置:/notice/{业务id}.json
- /// 通知主体存放位置: /notice/{业务id}.json
- /// 活跃通知放在CosmosDB Common表中,并设置"ttl":2592000,不能超过30天(2592000),一天(3600),一周(25200),允许删除
- /// 过期通知存放至blob中,存放位置, 允许被删除,直接删除记录
- /// stuid:/student/stuid/receiver/xxxx时间戳排序.json
- /// tmdid:/receiver/xxxx时间戳排序.json
- /// </summary>
- public class Notice
- {
- /// <summary>
- /// 业务的id
- /// </summary>
- public string id { get; set; }
- /// <summary>
- /// Notice-{hbcn/tmdid}
- /// </summary>
- public string code { get; set; }
- public string scode { get; set; }
- public string school { get; set; }
- public string scope { get; set; }
- public string spk { get; set; }
- /// <summary>
- /// 通知
- /// </summary>
- public string pk { get; set; } = "Notice";
- /// <summary>
- /// 类型
- /// </summary>
- public string type { get; set; }
- public int level { get; set; }
- public string data { get; set; }
- public int stime { get; set; }
- public int etime { get; set; }
- /// <summary>
- /// 被通知的醍摩豆账号
- /// </summary>
- public List<string> tmdids { get; set; }
- /// <summary>
- /// 被通知的学校学生账号
- /// </summary>
- public List<string> stuids { get; set; }
- }
- /*
- {
- "id":"通知id"
- "code":"接收者1",
- "status":"接收状态/已发送/已查看",
- "pk":"receiver",
- "ttl":2592000,不能超过30天(2592000),一天(3600),一周(25200)
- }
- */
- public class Receiver : CosmosEntity
- {
- public string pk { get; set; } = "Receiver";
- /// <summary>
- /// 0 已发送,1已查看,2已处理,-1已过期
- /// </summary>
- public int status { get; set; }=0;
- }
- }
|