using MongoDB.Bson.Serialization.Attributes; using System.ComponentModel.DataAnnotations; namespace Landmark.OLA.Models.Loan { public class BranchData { [Required] [StringLength(5, MinimumLength = 5, ErrorMessage = "Zipcodes must be 5 digits")] public string Zipcode { get; set; } [Required] [Range(minimum: 1, maximum: 99999999)] public int ChannelId { get; set; } public BranchData(string zip, int channel) { this.Zipcode = zip; this.ChannelId = channel; } } [BsonIgnoreExtraElements] public class BranchConfig : OlaModel { public DateTime Date { get; set; } [Required] public List BranchCodesByZip { get; set; } } }