Skip to content

Commit

Permalink
feat(tiktokshop): 随官方更新商品相关接口模型
Browse files Browse the repository at this point in the history
  • Loading branch information
fudiwei committed Aug 8, 2024
1 parent b8f3feb commit 3f6c1c2
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,13 @@ public class Manufacturer
[System.Text.Json.Serialization.JsonPropertyName("description")]
public string? Description { get; set; }

/// <summary>
/// 获取或设置分类版本。
/// </summary>
[Newtonsoft.Json.JsonProperty("category_version")]
[System.Text.Json.Serialization.JsonPropertyName("category_version")]
public string? CategoryVersion { get; set; }

/// <summary>
/// 获取或设置分类 ID。
/// </summary>
Expand Down Expand Up @@ -561,5 +568,12 @@ public class Manufacturer
[Newtonsoft.Json.JsonProperty("manufacturer")]
[System.Text.Json.Serialization.JsonPropertyName("manufacturer")]
public Types.Manufacturer? Manufacturer { get; set; }

/// <summary>
/// 获取或设置是否为非卖品。
/// </summary>
[Newtonsoft.Json.JsonProperty("is_not_for_sale")]
[System.Text.Json.Serialization.JsonPropertyName("is_not_for_sale")]
public bool? IsNotForSale { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,24 @@ public class Category
public bool IsLeaf { get; set; }
}

public class RecommendedCategory
{
/// <summary>
/// 获取或设置分类 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("id")]
[System.Text.Json.Serialization.JsonPropertyName("id")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))]
public string CategoryId { get; set; } = default!;

/// <summary>
/// 获取或设置名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("local_name")]
[System.Text.Json.Serialization.JsonPropertyName("local_name")]
public string Name { get; set; } = default!;
}

public class Brand
{
/// <summary>
Expand Down Expand Up @@ -776,6 +794,13 @@ public class AuditFailedReason
[System.Text.Json.Serialization.JsonPropertyName("category_chains")]
public Types.Category[] CategoryList { get; set; } = default!;

/// <summary>
/// 获取或设置推荐分类列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("recommended_categories")]
[System.Text.Json.Serialization.JsonPropertyName("recommended_categories")]
public Types.RecommendedCategory[]? RecommendedCategoryList { get; set; }

/// <summary>
/// 获取或设置品牌信息。
/// </summary>
Expand Down Expand Up @@ -860,6 +885,13 @@ public class AuditFailedReason
[System.Text.Json.Serialization.JsonPropertyName("manufacturer")]
public Types.Manufacturer? Manufacturer { get; set; }

/// <summary>
/// 获取或设置是否为非卖品。
/// </summary>
[Newtonsoft.Json.JsonProperty("is_not_for_sale")]
[System.Text.Json.Serialization.JsonPropertyName("is_not_for_sale")]
public bool IsNotForSale { get; set; }

/// <summary>
/// 获取或设置审核失败原因列表。
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,24 @@ public class Product
{
public static class Types
{
public class RecommendedCategory
{
/// <summary>
/// 获取或设置分类 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("id")]
[System.Text.Json.Serialization.JsonPropertyName("id")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.NumericalStringReadOnlyConverter))]
public string CategoryId { get; set; } = default!;

/// <summary>
/// 获取或设置名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("local_name")]
[System.Text.Json.Serialization.JsonPropertyName("local_name")]
public string Name { get; set; } = default!;
}

public class SKU
{
public static class Types
Expand Down Expand Up @@ -131,13 +149,27 @@ public class Inventory
[System.Text.Json.Serialization.JsonPropertyName("update_time")]
public long UpdateTimestamp { get; set; }

/// <summary>
/// 获取或设置推荐分类列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("recommended_categories")]
[System.Text.Json.Serialization.JsonPropertyName("recommended_categories")]
public Types.RecommendedCategory[]? RecommendedCategoryList { get; set; }

/// <summary>
/// 获取或设置 SKU 列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("skus")]
[System.Text.Json.Serialization.JsonPropertyName("skus")]
public Types.SKU[] SKUList { get; set; } = default!;

/// <summary>
/// 获取或设置是否为非卖品。
/// </summary>
[Newtonsoft.Json.JsonProperty("is_not_for_sale")]
[System.Text.Json.Serialization.JsonPropertyName("is_not_for_sale")]
public bool IsNotForSale { get; set; }

/// <summary>
/// 获取或设置同步失败原因。
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,13 @@ public class Manufacturer : ProductCreateProductRequest.Types.Manufacturer
[System.Text.Json.Serialization.JsonPropertyName("description")]
public string? Description { get; set; }

/// <summary>
/// 获取或设置分类版本。
/// </summary>
[Newtonsoft.Json.JsonProperty("category_version")]
[System.Text.Json.Serialization.JsonPropertyName("category_version")]
public string? CategoryVersion { get; set; }

/// <summary>
/// 获取或设置分类 ID。
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,6 @@
"title": "Men's Fashion Sports Low Cut Cotton Breathable Ankle Short Boat Invisible Socks",
"video": {
"id": "v09e40f40000cfu0ovhc77ub7fl97k4w"
}
},
"is_not_for_sale": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
"parent_id": "851848"
}
],
"recommended_categories": [
{
"id": "853000",
"local_name": "Botol & Stoples Penyimpanan"
}
],
"certifications": [
{
"files": [
Expand Down Expand Up @@ -193,7 +199,8 @@
"size": 1000,
"url": "https://v16m-default.akamaized.net/bbae7099581b26cd340beaa7821b2d8c/64de6020/video/tos/alisg/tos-alisg-v-f466fc-sg/oMne9QuzIBN3fIDN7bFCCMbBKuGigg12ghDC8k/?a=0&ch=0&cr=0&dr=0&er=0&lr=default&cd=0%7C0%7C0%7C0&br=2212&bt=1106&cs=0&ds=3&ft=dl9~j-Inz7TKnfsfiyq8Z&mime_type=video_mp4&qs=13&rc=anR4Ojk6ZmYzbTMzODRmNEBpanR4Ojk6ZmYzbTMzODRmNEBsYWFwcjRva2NgLS1kLy1zYSNsYWFwcjRva2NgLS1kLy1zcw%3D%3D&l=202308171159498F7B108584E58B010932&btag=e00048000",
"width": 1280
}
},
"is_not_for_sale": false
},
"message": "Success",
"request_id": "202203070749000101890810281E8C70B7"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@
{
"create_time": 1234567890,
"id": "1729592969712207008",
"is_not_for_sale": true,
"product_sync_fail_reasons": "The required qualification is missed.",
"recommended_categories": [
{
"id": "853000",
"local_name": "Botol & Stoples Penyimpanan"
}
],
"sales_regions": [
"US"
],
Expand Down

0 comments on commit 3f6c1c2

Please sign in to comment.