49 lines
		
	
	
		
			938 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			49 lines
		
	
	
		
			938 B
		
	
	
	
		
			C#
		
	
	
	
	
	
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; }
 | 
						|
} |