34 lines
969 B
C#
34 lines
969 B
C#
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;
|
||
}
|