using Microsoft.Azure.Cosmos.Table; using System; using System.Collections.Generic; using System.Text; using TEAMModelOS.SDK.Context.Attributes.Azure; namespace TEAMModelOS.SDK.Models { /* { "id":"uuid", "code":"base", "pk":"Api", "name": "学校基本信息", "url": "school/get", "method": "GET/POST", "descr": "描述" } */ /// /// 限流方案 漏斗、令牌桶、sentinel /// 平台开放的OpenAIPs /// [TableName(Name = "OpenApi")] public class OpenApi : TableEntity { public OpenApi() { PartitionKey = "IES5-API"; } /// /// 接口名称 /// public string name { get; set; } /// /// 接口url /// public string url { get; set; } /// /// 请求方法 /// public string method { get; set; } /// /// 开放的api接口 /// public string descr { get; set; } public int auth { get; set; } /// /// r,w,d,l /// public string type { get; set; } } [TableName(Name = "OpenApi")] public class Webhook : TableEntity { public Webhook() { PartitionKey = "IES5-WEBHOOK"; } /// /// 接口名称 /// public string name { get; set; } /// /// 接口url /// public string url { get; set; } /// /// 请求方法 /// public string method { get; set; } /// /// 开放的api接口 /// public string descr { get; set; } public int auth { get; set; } /// /// r,w,d,l /// public string type { get; set; } } public class OpenApp : CosmosEntity { /// /// 图标 /// public string icon { get; set; } /// /// 应用名称 /// public string name { get; set; } /// /// 应用描述 /// public string descr { get; set; } /// /// 授权信息 /// public List auths { get; set; } = new List(); public List webhooks { get; set; } = new List(); /// /// 学校编码 /// public string school { get; set; } /// /// 生成的token /// public string token { get; set; } /// /// domain的域名 /// public string domain { get; set; } /// ///webhook /// public string webhookToken { get; set; } /// /// 0禁用,1正常,2 token封禁 /// public int status { get; set; } public OpenApp() { pk = "OpenApp"; } } }