feat: add recurring places and transaction pagination
Build MoneyMap image / build-and-push (push) Failing after 4s
Build MoneyMap image / build-and-push (push) Failing after 4s
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace MoneyMap.Models;
|
||||
|
||||
[Index(nameof(MerchantId), nameof(CardId), nameof(Frequency), IsUnique = true)]
|
||||
public class RecurringPlace
|
||||
{
|
||||
[Key]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required]
|
||||
public int MerchantId { get; set; }
|
||||
public Merchant Merchant { get; set; } = null!;
|
||||
|
||||
[Required]
|
||||
public int CardId { get; set; }
|
||||
public Card Card { get; set; } = null!;
|
||||
|
||||
[Required]
|
||||
public int CategoryId { get; set; }
|
||||
public Category Category { get; set; } = null!;
|
||||
|
||||
[Column(TypeName = "decimal(18,2)")]
|
||||
public decimal Amount { get; set; }
|
||||
|
||||
[Required]
|
||||
[MaxLength(50)]
|
||||
public string Frequency { get; set; } = string.Empty; // e.g., "Monthly", "Weekly", "Quarterly"
|
||||
|
||||
[Required]
|
||||
public DateTime NextDueDate { get; set; }
|
||||
|
||||
[MaxLength(500)]
|
||||
public string Notes { get; set; } = string.Empty;
|
||||
|
||||
[NotMapped]
|
||||
public string DisplayLabel => $"{Merchant.Name} - {Card.Last4} - {Frequency} - ${Amount:N2}";
|
||||
}
|
||||
Reference in New Issue
Block a user