complete controllers
This commit is contained in:
49
Server/Controller/FlowerApiController.structs.cs
Normal file
49
Server/Controller/FlowerApiController.structs.cs
Normal 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; }
|
||||
}
|
||||
Reference in New Issue
Block a user