Files
Api/DouyinApi.Model/DailyFortune/DailyFortuneRequest.cs
2025-11-09 18:41:10 +08:00

34 lines
969 B
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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;
}