50 lines
1.1 KiB
C#
50 lines
1.1 KiB
C#
|
|
namespace Application.Dto.Category;
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 分类响应
|
||
|
|
/// </summary>
|
||
|
|
public record CategoryResponse
|
||
|
|
{
|
||
|
|
public long Id { get; init; }
|
||
|
|
public string Name { get; init; } = string.Empty;
|
||
|
|
public TransactionType Type { get; init; }
|
||
|
|
public string? Icon { get; init; }
|
||
|
|
public DateTime CreateTime { get; init; }
|
||
|
|
public DateTime? UpdateTime { get; init; }
|
||
|
|
}
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 创建分类请求
|
||
|
|
/// </summary>
|
||
|
|
public record CreateCategoryRequest
|
||
|
|
{
|
||
|
|
public string Name { get; init; } = string.Empty;
|
||
|
|
public TransactionType Type { get; init; }
|
||
|
|
}
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 更新分类请求
|
||
|
|
/// </summary>
|
||
|
|
public record UpdateCategoryRequest
|
||
|
|
{
|
||
|
|
public long Id { get; init; }
|
||
|
|
public string Name { get; init; } = string.Empty;
|
||
|
|
}
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 生成图标请求
|
||
|
|
/// </summary>
|
||
|
|
public record GenerateIconRequest
|
||
|
|
{
|
||
|
|
public long CategoryId { get; init; }
|
||
|
|
}
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// 更新选中图标请求
|
||
|
|
/// </summary>
|
||
|
|
public record UpdateSelectedIconRequest
|
||
|
|
{
|
||
|
|
public long CategoryId { get; init; }
|
||
|
|
public int SelectedIndex { get; init; }
|
||
|
|
}
|