fix
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
namespace WebApi.Controllers.Dto;
|
||||
|
||||
public class CreateBudgetDto
|
||||
{
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public BudgetPeriodType Type { get; set; } = BudgetPeriodType.Month;
|
||||
public decimal Limit { get; set; }
|
||||
public BudgetCategory Category { get; set; }
|
||||
public string[] SelectedCategories { get; set; } = [];
|
||||
public DateTime? StartDate { get; set; }
|
||||
public bool NoLimit { get; set; } = false;
|
||||
public bool IsMandatoryExpense { get; set; } = false;
|
||||
}
|
||||
|
||||
public class UpdateBudgetDto : CreateBudgetDto
|
||||
{
|
||||
public long Id { get; set; }
|
||||
}
|
||||
|
||||
public class UpdateArchiveSummaryDto
|
||||
{
|
||||
public DateTime ReferenceDate { get; set; }
|
||||
public string? Summary { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
namespace WebApi.Controllers.Dto;
|
||||
|
||||
/// <summary>
|
||||
/// 邮件消息DTO,包含额外的统计信息
|
||||
/// </summary>
|
||||
public class EmailMessageDto
|
||||
{
|
||||
public long Id { get; set; }
|
||||
|
||||
public string Subject { get; set; } = string.Empty;
|
||||
|
||||
public string From { get; set; } = string.Empty;
|
||||
|
||||
public string Body { get; set; } = string.Empty;
|
||||
|
||||
public string HtmlBody { get; set; } = string.Empty;
|
||||
|
||||
public DateTime ReceivedDate { get; set; }
|
||||
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
public DateTime? UpdateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 已解析的账单数量
|
||||
/// </summary>
|
||||
public int TransactionCount { get; set; }
|
||||
|
||||
public string ToName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 从实体转换为DTO
|
||||
/// </summary>
|
||||
public static EmailMessageDto FromEntity(EmailMessage entity, int transactionCount = 0)
|
||||
{
|
||||
return new EmailMessageDto
|
||||
{
|
||||
Id = entity.Id,
|
||||
Subject = entity.Subject,
|
||||
From = entity.From,
|
||||
Body = entity.Body,
|
||||
HtmlBody = entity.HtmlBody,
|
||||
ReceivedDate = entity.ReceivedDate,
|
||||
CreateTime = entity.CreateTime,
|
||||
UpdateTime = entity.UpdateTime,
|
||||
TransactionCount = transactionCount,
|
||||
ToName = entity.To.Split('<').FirstOrDefault()?.Trim() ?? "未知"
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
namespace WebApi.Controllers.Dto;
|
||||
|
||||
public class LoginRequest
|
||||
{
|
||||
public string Password { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
namespace WebApi.Controllers.Dto;
|
||||
|
||||
public class LoginResponse
|
||||
{
|
||||
public string Token { get; set; } = string.Empty;
|
||||
public DateTime ExpiresAt { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user