fix
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 39s
Docker Build & Deploy / Deploy to Production (push) Successful in 12s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 2s

This commit is contained in:
孙诚
2026-01-16 23:18:04 +08:00
parent 14bbd62262
commit c74ce24727
8 changed files with 207 additions and 74 deletions

View File

@@ -139,7 +139,8 @@ public class BudgetController(
Category = dto.Category,
SelectedCategories = dto.SelectedCategories != null ? string.Join(",", dto.SelectedCategories) : string.Empty,
StartDate = dto.StartDate ?? DateTime.Now,
NoLimit = dto.NoLimit
NoLimit = dto.NoLimit,
IsMandatoryExpense = dto.IsMandatoryExpense
};
var varidationError = await ValidateBudgetSelectedCategoriesAsync(budget);
@@ -182,6 +183,7 @@ public class BudgetController(
budget.Category = dto.Category;
budget.SelectedCategories = dto.SelectedCategories != null ? string.Join(",", dto.SelectedCategories) : string.Empty;
budget.NoLimit = dto.NoLimit;
budget.IsMandatoryExpense = dto.IsMandatoryExpense;
if (dto.StartDate.HasValue)
{
budget.StartDate = dto.StartDate.Value;

View File

@@ -9,6 +9,7 @@ public class CreateBudgetDto
public string[] SelectedCategories { get; set; } = Array.Empty<string>();
public DateTime? StartDate { get; set; }
public bool NoLimit { get; set; } = false;
public bool IsMandatoryExpense { get; set; } = false;
}
public class UpdateBudgetDto : CreateBudgetDto