Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

46 linhas
1.2KB

  1. using System.ComponentModel.DataAnnotations;
  2. using System.ComponentModel.DataAnnotations.Schema;
  3. namespace Campaign_Tracker.Server.Models;
  4. public class MunicipalityAddress
  5. {
  6. public int Id { get; set; }
  7. [Required]
  8. public int MunicipalityId { get; set; }
  9. [Required]
  10. [StringLength(20)]
  11. public string AddressType { get; set; } = string.Empty; // "Mailing" or "Delivery"
  12. [Required]
  13. [StringLength(200)]
  14. public string Street { get; set; } = string.Empty;
  15. [Required]
  16. [StringLength(100)]
  17. public string City { get; set; } = string.Empty;
  18. [Required]
  19. [StringLength(50)]
  20. public string State { get; set; } = string.Empty;
  21. [Required]
  22. [StringLength(20)]
  23. public string ZipCode { get; set; } = string.Empty;
  24. [Required]
  25. public DateTime EffectiveDate { get; set; }
  26. public bool IsCurrent { get; set; } = true;
  27. public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
  28. public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
  29. // Navigation property
  30. [ForeignKey("MunicipalityId")]
  31. public Municipality Municipality { get; set; } = null!;
  32. }

Powered by TurnKey Linux.