每日运势小程序
This commit is contained in:
33
DouyinApi.Model/DailyFortune/DailyFortuneRequest.cs
Normal file
33
DouyinApi.Model/DailyFortune/DailyFortuneRequest.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace DouyinApi.Model.DailyFortune;
|
||||
|
||||
public class DailyFortuneRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 出生日期,格式 yyyy-MM-dd。
|
||||
/// </summary>
|
||||
[Required]
|
||||
[RegularExpression(@"\d{4}-\d{2}-\d{2}", ErrorMessage = "birth_date_invalid")]
|
||||
public string BirthDate { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 出生时间,格式 HH:mm,可为空。
|
||||
/// </summary>
|
||||
[RegularExpression(@"^$|^\d{2}:\d{2}$", ErrorMessage = "birth_time_invalid")]
|
||||
public string BirthTime { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 出生城市(精确到市)。
|
||||
/// </summary>
|
||||
[Required]
|
||||
[MinLength(2)]
|
||||
[MaxLength(40)]
|
||||
public string BirthCity { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 出生省份/州信息,选填,用于提示词增强。
|
||||
/// </summary>
|
||||
[MaxLength(40)]
|
||||
public string BirthProvince { get; set; } = string.Empty;
|
||||
}
|
||||
93
DouyinApi.Model/DailyFortune/DailyFortuneResponse.cs
Normal file
93
DouyinApi.Model/DailyFortune/DailyFortuneResponse.cs
Normal file
@@ -0,0 +1,93 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace DouyinApi.Model.DailyFortune;
|
||||
|
||||
public class DailyFortuneResponse
|
||||
{
|
||||
public string FortuneDate { get; set; } = string.Empty;
|
||||
|
||||
public FortuneProfile Profile { get; set; } = new FortuneProfile();
|
||||
|
||||
public IReadOnlyList<FortuneDimension> Dimensions { get; set; } = new List<FortuneDimension>();
|
||||
|
||||
public LuckyGuide LuckyGuide { get; set; } = new LuckyGuide();
|
||||
|
||||
public string Summary { get; set; } = string.Empty;
|
||||
|
||||
public string Narrative { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class FortuneProfile
|
||||
{
|
||||
public string BirthCity { get; set; } = string.Empty;
|
||||
|
||||
public string BirthProvince { get; set; } = string.Empty;
|
||||
|
||||
public string BirthDateTime { get; set; } = string.Empty;
|
||||
|
||||
public IReadOnlyList<PillarInfo> BirthPillars { get; set; } = new List<PillarInfo>();
|
||||
|
||||
public IReadOnlyList<PillarInfo> TodayPillars { get; set; } = new List<PillarInfo>();
|
||||
|
||||
public IReadOnlyList<DailyFortuneFiveElementScore> FiveElementDistribution { get; set; } = new List<DailyFortuneFiveElementScore>();
|
||||
|
||||
public IReadOnlyList<string> WeakElements { get; set; } = new List<string>();
|
||||
|
||||
public IReadOnlyList<string> StrongElements { get; set; } = new List<string>();
|
||||
}
|
||||
|
||||
public class PillarInfo
|
||||
{
|
||||
public string Label { get; set; } = string.Empty;
|
||||
|
||||
public string Value { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class DailyFortuneFiveElementScore
|
||||
{
|
||||
public string Element { get; set; } = string.Empty;
|
||||
|
||||
public int Count { get; set; }
|
||||
}
|
||||
|
||||
public class FortuneDimension
|
||||
{
|
||||
public string Key { get; set; } = string.Empty;
|
||||
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
public int Score { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// up / down / steady
|
||||
/// </summary>
|
||||
public string Trend { get; set; } = "steady";
|
||||
|
||||
public string Insight { get; set; } = string.Empty;
|
||||
|
||||
public string Suggestion { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class LuckyGuide
|
||||
{
|
||||
public string Element { get; set; } = string.Empty;
|
||||
|
||||
public IReadOnlyList<string> Colors { get; set; } = new List<string>();
|
||||
|
||||
public IReadOnlyList<string> Directions { get; set; } = new List<string>();
|
||||
|
||||
public IReadOnlyList<string> Props { get; set; } = new List<string>();
|
||||
|
||||
public IReadOnlyList<string> Activities { get; set; } = new List<string>();
|
||||
|
||||
public IReadOnlyList<LuckyTimeSlot> BestTimeSlots { get; set; } = new List<LuckyTimeSlot>();
|
||||
}
|
||||
|
||||
public class LuckyTimeSlot
|
||||
{
|
||||
public string Label { get; set; } = string.Empty;
|
||||
|
||||
public string Period { get; set; } = string.Empty;
|
||||
|
||||
public string Reason { get; set; } = string.Empty;
|
||||
}
|
||||
Reference in New Issue
Block a user