添加项目文件。
This commit is contained in:
160
Common/DTOS/FeishuResponse.cs
Normal file
160
Common/DTOS/FeishuResponse.cs
Normal file
@@ -0,0 +1,160 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
||||
namespace Common.DTOS
|
||||
{
|
||||
public class FeishuResponse<T>
|
||||
{
|
||||
[JsonProperty("code")]
|
||||
public int Code { get; set; }
|
||||
|
||||
[JsonProperty("msg")]
|
||||
public string Msg { get; set; }
|
||||
|
||||
[JsonProperty("data")]
|
||||
public T Data { get; set; }
|
||||
}
|
||||
|
||||
#region 创建多维表格返回数据
|
||||
public class CreateBitableAppData
|
||||
{
|
||||
[JsonProperty("app")]
|
||||
public AppInfo App { get; set; }
|
||||
}
|
||||
|
||||
public class AppInfo
|
||||
{
|
||||
[JsonProperty("app_token")]
|
||||
public string AppToken { get; set; }
|
||||
|
||||
[JsonProperty("default_table_id")]
|
||||
public string DefaultTableId { get; set; }
|
||||
|
||||
[JsonProperty("folder_token")]
|
||||
public string FolderToken { get; set; }
|
||||
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[JsonProperty("url")]
|
||||
public string Url { get; set; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 新增数据表返回数据
|
||||
public class CreateTableData
|
||||
{
|
||||
[JsonProperty("default_view_id")]
|
||||
public string DefaultViewId { get; set; }
|
||||
|
||||
[JsonProperty("field_id_list")]
|
||||
public List<string> FieldIdList { get; set; }
|
||||
|
||||
[JsonProperty("table_id")]
|
||||
public string TableId { get; set; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 查询数据表列表返回数据
|
||||
|
||||
public class QueryTableListData
|
||||
{
|
||||
[JsonProperty("has_more")]
|
||||
public bool HasMore { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public List<TableItem> Items { get; set; }
|
||||
|
||||
[JsonProperty("page_token")]
|
||||
public string PageToken { get; set; }
|
||||
|
||||
[JsonProperty("total")]
|
||||
public int Total { get; set; }
|
||||
}
|
||||
|
||||
public class TableItem
|
||||
{
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[JsonProperty("revision")]
|
||||
public int Revision { get; set; }
|
||||
|
||||
[JsonProperty("table_id")]
|
||||
public string TableId { get; set; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 更新或新增记录返回数据
|
||||
|
||||
public class CreateRecordData
|
||||
{
|
||||
[JsonProperty("record")]
|
||||
public RecordInfo Record { get; set; }
|
||||
}
|
||||
|
||||
public class RecordInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 字段数据(字段名 -> 值)
|
||||
/// </summary>
|
||||
[JsonProperty("fields")]
|
||||
public Dictionary<string, object> Fields { get; set; }
|
||||
|
||||
[JsonProperty("id")]
|
||||
public string Id { get; set; }
|
||||
|
||||
[JsonProperty("record_id")]
|
||||
public string RecordId { get; set; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 查询记录返回数据
|
||||
public class QueryRecordListData
|
||||
{
|
||||
[JsonProperty("has_more")]
|
||||
public bool HasMore { get; set; }
|
||||
|
||||
[JsonProperty("items")]
|
||||
public List<RecordItem> Items { get; set; }
|
||||
|
||||
[JsonProperty("total")]
|
||||
public int Total { get; set; }
|
||||
}
|
||||
|
||||
public class RecordItem
|
||||
{
|
||||
[JsonProperty("record_id")]
|
||||
public string RecordId { get; set; }
|
||||
|
||||
[JsonProperty("fields")]
|
||||
public Dictionary<string, object> Fields { get; set; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 多行创建返回数据
|
||||
public class CreateRecordsRequest
|
||||
{
|
||||
[JsonProperty("records")]
|
||||
public List<CreateRecordItem> Records { get; set; }
|
||||
}
|
||||
public class CreateRecordItem
|
||||
{
|
||||
/// <summary>
|
||||
/// 字段数据(字段名 -> 值)
|
||||
/// </summary>
|
||||
[JsonProperty("fields")]
|
||||
public Dictionary<string, object> Fields { get; set; }
|
||||
[JsonProperty("id")]
|
||||
public string Id { get; set; }
|
||||
|
||||
[JsonProperty("record_id")]
|
||||
public string RecordId { get; set; }
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
Reference in New Issue
Block a user