添加项目文件。

This commit is contained in:
hsc
2025-12-18 17:26:20 +08:00
parent 942fef0e13
commit 69aaa5c4e5
40 changed files with 2053 additions and 0 deletions

View 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
}