feat(1099): add payer EIN to ChurchProfile (entity, DTO, migration)
Add PayerEin (nullable string, max 20) to ChurchProfile entity, AppDbContext config, ChurchProfileDto response, UpdateChurchProfileRequest, and ChurchProfileService round-trip — mirroring the Phone/BankRoutingNumber nullable-string pattern. Migration AddPayerEinToChurchProfile adds only the one nullable column to ChurchProfiles. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,7 @@ public class ChurchProfileDto
|
|||||||
public string? BankName { get; set; }
|
public string? BankName { get; set; }
|
||||||
public string? BankAccountNumber { get; set; }
|
public string? BankAccountNumber { get; set; }
|
||||||
public string? BankRoutingNumber { get; set; }
|
public string? BankRoutingNumber { get; set; }
|
||||||
|
public string? PayerEin { get; set; }
|
||||||
public int NextCheckNumber { get; set; }
|
public int NextCheckNumber { get; set; }
|
||||||
public string AiProvider { get; set; } = "Claude";
|
public string AiProvider { get; set; } = "Claude";
|
||||||
public string? ClaudeModel { get; set; }
|
public string? ClaudeModel { get; set; }
|
||||||
@@ -38,6 +39,7 @@ public class UpdateChurchProfileRequest
|
|||||||
[MaxLength(200)] public string? BankName { get; set; }
|
[MaxLength(200)] public string? BankName { get; set; }
|
||||||
[MaxLength(50)] public string? BankAccountNumber { get; set; }
|
[MaxLength(50)] public string? BankAccountNumber { get; set; }
|
||||||
[MaxLength(50)] public string? BankRoutingNumber { get; set; }
|
[MaxLength(50)] public string? BankRoutingNumber { get; set; }
|
||||||
|
[MaxLength(20)] public string? PayerEin { get; set; }
|
||||||
[Range(1, int.MaxValue)] public int NextCheckNumber { get; set; }
|
[Range(1, int.MaxValue)] public int NextCheckNumber { get; set; }
|
||||||
[MaxLength(20)] public string AiProvider { get; set; } = "Claude";
|
[MaxLength(20)] public string AiProvider { get; set; } = "Claude";
|
||||||
[MaxLength(100)] public string? ClaudeModel { get; set; }
|
[MaxLength(100)] public string? ClaudeModel { get; set; }
|
||||||
|
|||||||
@@ -393,6 +393,7 @@ public class AppDbContext : IdentityDbContext<AppUser, AppRole, string>
|
|||||||
entity.Property(e => e.BankName).HasMaxLength(200);
|
entity.Property(e => e.BankName).HasMaxLength(200);
|
||||||
entity.Property(e => e.BankAccountNumber).HasMaxLength(50);
|
entity.Property(e => e.BankAccountNumber).HasMaxLength(50);
|
||||||
entity.Property(e => e.BankRoutingNumber).HasMaxLength(50);
|
entity.Property(e => e.BankRoutingNumber).HasMaxLength(50);
|
||||||
|
entity.Property(e => e.PayerEin).HasMaxLength(20);
|
||||||
entity.Property(e => e.NameZh).HasMaxLength(200);
|
entity.Property(e => e.NameZh).HasMaxLength(200);
|
||||||
entity.Property(e => e.Phone).HasMaxLength(50);
|
entity.Property(e => e.Phone).HasMaxLength(50);
|
||||||
entity.Property(e => e.Email).HasMaxLength(200);
|
entity.Property(e => e.Email).HasMaxLength(200);
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ public class ChurchProfile : AuditableEntity, IAuditable
|
|||||||
public string? BankAccountNumber { get; set; }
|
public string? BankAccountNumber { get; set; }
|
||||||
public string? BankRoutingNumber { get; set; }
|
public string? BankRoutingNumber { get; set; }
|
||||||
|
|
||||||
|
/// <summary>Payer EIN printed on Form 1099-NEC Copy B; the church's own public business identifier.</summary>
|
||||||
|
public string? PayerEin { get; set; }
|
||||||
|
|
||||||
// ── AI assist provider settings (editable via Church Profile → AI 設定 tab) ──
|
// ── AI assist provider settings (editable via Church Profile → AI 設定 tab) ──
|
||||||
public string AiProvider { get; set; } = "Claude"; // "Claude" | "Gemini"
|
public string AiProvider { get; set; } = "Claude"; // "Claude" | "Gemini"
|
||||||
public string? ClaudeModel { get; set; } = "claude-haiku-4-5-20251001";
|
public string? ClaudeModel { get; set; } = "claude-haiku-4-5-20251001";
|
||||||
|
|||||||
+2680
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,29 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace ROLAC.API.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class AddPayerEinToChurchProfile : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "PayerEin",
|
||||||
|
table: "ChurchProfiles",
|
||||||
|
type: "character varying(20)",
|
||||||
|
maxLength: 20,
|
||||||
|
nullable: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "PayerEin",
|
||||||
|
table: "ChurchProfiles");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -506,6 +506,10 @@ namespace ROLAC.API.Migrations
|
|||||||
b.Property<int>("NextCheckNumber")
|
b.Property<int>("NextCheckNumber")
|
||||||
.HasColumnType("integer");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<string>("PayerEin")
|
||||||
|
.HasMaxLength(20)
|
||||||
|
.HasColumnType("character varying(20)");
|
||||||
|
|
||||||
b.Property<string>("Phone")
|
b.Property<string>("Phone")
|
||||||
.HasMaxLength(50)
|
.HasMaxLength(50)
|
||||||
.HasColumnType("character varying(50)");
|
.HasColumnType("character varying(50)");
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public class ChurchProfileService : IChurchProfileService
|
|||||||
Id = p.Id, Name = p.Name, NameZh = p.NameZh, Phone = p.Phone, Email = p.Email,
|
Id = p.Id, Name = p.Name, NameZh = p.NameZh, Phone = p.Phone, Email = p.Email,
|
||||||
Website = p.Website, Address = p.Address, City = p.City, State = p.State,
|
Website = p.Website, Address = p.Address, City = p.City, State = p.State,
|
||||||
ZipCode = p.ZipCode, BankName = p.BankName, BankAccountNumber = p.BankAccountNumber,
|
ZipCode = p.ZipCode, BankName = p.BankName, BankAccountNumber = p.BankAccountNumber,
|
||||||
BankRoutingNumber = p.BankRoutingNumber, NextCheckNumber = p.NextCheckNumber,
|
BankRoutingNumber = p.BankRoutingNumber, PayerEin = p.PayerEin, NextCheckNumber = p.NextCheckNumber,
|
||||||
AiProvider = p.AiProvider,
|
AiProvider = p.AiProvider,
|
||||||
ClaudeModel = p.ClaudeModel,
|
ClaudeModel = p.ClaudeModel,
|
||||||
ClaudeApiKeyMasked = Mask(p.ClaudeApiKey),
|
ClaudeApiKeyMasked = Mask(p.ClaudeApiKey),
|
||||||
@@ -33,7 +33,7 @@ public class ChurchProfileService : IChurchProfileService
|
|||||||
p.Name = r.Name; p.NameZh = r.NameZh; p.Phone = r.Phone; p.Email = r.Email;
|
p.Name = r.Name; p.NameZh = r.NameZh; p.Phone = r.Phone; p.Email = r.Email;
|
||||||
p.Website = r.Website; p.Address = r.Address; p.City = r.City; p.State = r.State;
|
p.Website = r.Website; p.Address = r.Address; p.City = r.City; p.State = r.State;
|
||||||
p.ZipCode = r.ZipCode; p.BankName = r.BankName; p.BankAccountNumber = r.BankAccountNumber;
|
p.ZipCode = r.ZipCode; p.BankName = r.BankName; p.BankAccountNumber = r.BankAccountNumber;
|
||||||
p.BankRoutingNumber = r.BankRoutingNumber; p.NextCheckNumber = r.NextCheckNumber;
|
p.BankRoutingNumber = r.BankRoutingNumber; p.PayerEin = r.PayerEin; p.NextCheckNumber = r.NextCheckNumber;
|
||||||
p.AiProvider = string.IsNullOrWhiteSpace(r.AiProvider) ? "Claude" : r.AiProvider;
|
p.AiProvider = string.IsNullOrWhiteSpace(r.AiProvider) ? "Claude" : r.AiProvider;
|
||||||
p.ClaudeModel = r.ClaudeModel;
|
p.ClaudeModel = r.ClaudeModel;
|
||||||
p.GeminiModel = r.GeminiModel;
|
p.GeminiModel = r.GeminiModel;
|
||||||
|
|||||||
Reference in New Issue
Block a user