complete controllers

This commit is contained in:
2023-05-25 21:54:40 +08:00
parent 3b5bd291f9
commit 50e7297848
21 changed files with 2257 additions and 566 deletions

View File

@@ -0,0 +1,49 @@
using System.ComponentModel.DataAnnotations;
namespace Blahblah.FlowerStory.Server.Controller;
/// <summary>
/// 花草参数
/// </summary>
public record FlowerParameter
{
/// <summary>
/// 类别 id
/// </summary>
[Required]
public int CategoryId { get; init; }
/// <summary>
/// 花草名称
/// </summary>
[Required]
public required string Name { get; init; }
/// <summary>
/// 购买时间
/// </summary>
[Required]
public long DateBuy { get; init; }
/// <summary>
/// 购买花费
/// </summary>
public decimal? Cost { get; init; }
/// <summary>
/// 购买渠道
/// </summary>
public string? Purchase { get; init; }
}
/// <summary>
/// 花草修改参数
/// </summary>
public record FlowerUpdateParameter : FlowerParameter
{
/// <summary>
/// 花草唯一 id
/// </summary>
[Required]
public int Id { get; set; }
}