From 89238bba999f387625275ed60d117a18956d0c4e Mon Sep 17 00:00:00 2001 From: Chris Chen Date: Thu, 25 Jun 2026 16:45:02 -0700 Subject: [PATCH] fix(1099): pin max-lengths on Payee1099/Form1099Box columns to match codebase Co-Authored-By: Claude Opus 4.8 --- API/ROLAC.API/Data/AppDbContext.cs | 13 +++++++++++++ API/ROLAC.API/Entities/Expense.cs | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/API/ROLAC.API/Data/AppDbContext.cs b/API/ROLAC.API/Data/AppDbContext.cs index a23b75b..b4baba5 100644 --- a/API/ROLAC.API/Data/AppDbContext.cs +++ b/API/ROLAC.API/Data/AppDbContext.cs @@ -227,6 +227,8 @@ public class AppDbContext : IdentityDbContext entity.Property(e => e.Name_en).HasMaxLength(200).IsRequired(); entity.Property(e => e.Name_zh).HasMaxLength(200); entity.Property(e => e.FormType).HasMaxLength(20).IsRequired(); + entity.Property(e => e.CreatedBy).HasMaxLength(450); + entity.Property(e => e.UpdatedBy).HasMaxLength(450); entity.HasIndex(e => e.BoxCode).IsUnique(); }); @@ -242,6 +244,17 @@ public class AppDbContext : IdentityDbContext entity.Property(e => e.State).HasMaxLength(2); entity.Property(e => e.Zip).HasMaxLength(10); entity.Property(e => e.W9Status).HasMaxLength(20).HasDefaultValue(Form1099.W9Status.Missing); + entity.Property(e => e.AddressLine1).HasMaxLength(200); + entity.Property(e => e.AddressLine2).HasMaxLength(200); + entity.Property(e => e.City).HasMaxLength(100); + entity.Property(e => e.Email).HasMaxLength(200); + entity.Property(e => e.Phone).HasMaxLength(30); + entity.Property(e => e.Notes).HasMaxLength(500); + entity.Property(e => e.W9BlobPath).HasMaxLength(500); + entity.Property(e => e.TinEncrypted).HasMaxLength(500); + entity.Property(e => e.CreatedBy).HasMaxLength(450); + entity.Property(e => e.UpdatedBy).HasMaxLength(450); + entity.Property(e => e.DeletedBy).HasMaxLength(450); entity.HasOne(e => e.Member).WithMany() .HasForeignKey(e => e.MemberId).OnDelete(DeleteBehavior.SetNull); }); diff --git a/API/ROLAC.API/Entities/Expense.cs b/API/ROLAC.API/Entities/Expense.cs index 34daddb..3da2229 100644 --- a/API/ROLAC.API/Entities/Expense.cs +++ b/API/ROLAC.API/Entities/Expense.cs @@ -11,7 +11,7 @@ public class Expense : SoftDeleteEntity, IAuditable public string Description { get; set; } = null!; public string? VendorName { get; set; } public int? MemberId { get; set; } - public int? PayeeId { get; set; } // 1099 recipient attribution (header-level) + public int? PayeeId { get; set; } // 1099 recipient attribution (header-level) public string? CheckNumber { get; set; } public DateOnly ExpenseDate { get; set; } public string? ReceiptBlobPath { get; set; }