✨
This commit is contained in:
36
StopShopping.Services/Models/Req/CreateRequestParams.cs
Normal file
36
StopShopping.Services/Models/Req/CreateRequestParams.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace StopShopping.Services.Models.Req;
|
||||
|
||||
/// <summary>
|
||||
/// 创建需求请求
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public record CreateRequestParams
|
||||
{
|
||||
/// <summary>
|
||||
/// 商品名
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[Required]
|
||||
[MaxLength(100)]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 描述
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[MaxLength(1000)]
|
||||
public string? Description { get; set; }
|
||||
/// <summary>
|
||||
/// 分类id
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public int CategoryId { get; set; }
|
||||
/// <summary>
|
||||
/// 截止日期
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[Required]
|
||||
[RegularExpression(@"^\d{4}\D\d{1,2}\D\d{1,2}$")]
|
||||
public string Deadline { get; set; } = string.Empty;
|
||||
}
|
||||
Reference in New Issue
Block a user