sync code

This commit is contained in:
2023-06-26 22:33:44 +08:00
parent 2d87e50dd0
commit 4bf330f824
26 changed files with 2644 additions and 62 deletions

View File

@@ -1,4 +1,5 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Mvc;
using System.ComponentModel.DataAnnotations;
namespace Blahblah.FlowerStory.Server.Controller;
@@ -11,29 +12,40 @@ public record FlowerParameter
/// 类别 id
/// </summary>
[Required]
[FromForm(Name = "categoryId")]
public int CategoryId { get; init; }
/// <summary>
/// 花草名称
/// </summary>
[Required]
[FromForm(Name = "name")]
public required string Name { get; init; }
/// <summary>
/// 购买时间
/// </summary>
[Required]
[FromForm(Name = "dateBuy")]
public long DateBuy { get; init; }
/// <summary>
/// 购买花费
/// </summary>
[FromForm(Name = "cost")]
public decimal? Cost { get; init; }
/// <summary>
/// 购买渠道
/// </summary>
[FromForm(Name = "purchase")]
public string? Purchase { get; init; }
/// <summary>
/// 花草封面
/// </summary>
[FromForm(Name = "cover")]
public IFormFile? Cover { get; init; }
}
/// <summary>
@@ -45,5 +57,6 @@ public record FlowerUpdateParameter : FlowerParameter
/// 花草唯一 id
/// </summary>
[Required]
[FromForm(Name = "id")]
public int Id { get; set; }
}