Nevar pievienot vairāk kā 25 tēmas
Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
|
- using System.ComponentModel.DataAnnotations;
- using System.ComponentModel.DataAnnotations.Schema;
-
- namespace Campaign_Tracker.Server.Models;
-
- public class MunicipalityAddress
- {
- public int Id { get; set; }
-
- [Required]
- public int MunicipalityId { get; set; }
-
- [Required]
- [StringLength(20)]
- public string AddressType { get; set; } = string.Empty; // "Mailing" or "Delivery"
-
- [Required]
- [StringLength(200)]
- public string Street { get; set; } = string.Empty;
-
- [Required]
- [StringLength(100)]
- public string City { get; set; } = string.Empty;
-
- [Required]
- [StringLength(50)]
- public string State { get; set; } = string.Empty;
-
- [Required]
- [StringLength(20)]
- public string ZipCode { get; set; } = string.Empty;
-
- [Required]
- public DateTime EffectiveDate { get; set; }
-
- public bool IsCurrent { get; set; } = true;
-
- public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
-
- public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
-
- // Navigation property
- [ForeignKey("MunicipalityId")]
- public Municipality Municipality { get; set; } = null!;
- }
|