using System; using System.ComponentModel.DataAnnotations; using System.Diagnostics.CodeAnalysis; namespace OnlineSalesAutoCrop.CoreAPI.Models.Requests.Systems { public class ThisSystemRequest { [Required, NotNull, StringLength(15, MinimumLength = 1, ErrorMessage = "Code must be between 1 to 15 characters.")] public string Code { get; set; } [Required, NotNull, StringLength(100, MinimumLength = 1, ErrorMessage = "Name must be between 1 to 100 characters.")] public string Name { get; set; } [Required, NotNull, StringLength(maximumLength: 50, MinimumLength = 3, ErrorMessage = "Bangla Name must be between 5 and 50 characters.")] public string BanglaName { get; set; } [Required, NotNull, StringLength(maximumLength: 150, MinimumLength = 3, ErrorMessage = "Address must be between 3 and 150 characters.")] public string Address { get; set; } [Required, NotNull, StringLength(maximumLength: 150, MinimumLength = 3, ErrorMessage = "Bangla Address must be between 3 and 150 characters.")] public string BanglaAddress { get; set; } [Required, NotNull, StringLength(maximumLength: 50, MinimumLength = 7, ErrorMessage = "Phone no must be between 7 and 50 characters.")] public string PhoneNo { get; set; } [Required, NotNull, StringLength(maximumLength: 50, MinimumLength = 11, ErrorMessage = "Mobile no must be between 11 and 50 characters.")] public string MobileNo { get; set; } [NotNull, EmailAddress, StringLength(50, MinimumLength = 0, ErrorMessage = "EmailAddress be between 0 to 50 characters.")] public string EmailAddress { get; set; } public string Website { get; set; } public string VatRegNo { get; set; } [Range(minimum: 0, maximum: 100, ConvertValueInInvariantCulture = true, ErrorMessage = "VAT rate must be between 0 to 100")] public decimal VatRate { get; set; } public bool EnfStgPwd { get; set; } [Range(minimum: 1, maximum: 30, ConvertValueInInvariantCulture = true, ErrorMessage = "Minimum length must be between 1 to 30")] public short PwdMinLen { get; set; } [Range(minimum: 1, maximum: 30, ConvertValueInInvariantCulture = true, ErrorMessage = "Maximum length must be between 1 to 30")] public short PwdMaxLen { get; set; } [Range(minimum: 0, maximum: 10, ConvertValueInInvariantCulture = true, ErrorMessage = "Disallowed password must be 0 to 10")] public short DisallowLastPwds { get; set; } [Range(minimum: 0, maximum: 365, ConvertValueInInvariantCulture = true, ErrorMessage = "Password life must be 0 to 365")] public short ExpiryDays { get; set; } [Range(minimum: 0, maximum: 20, ConvertValueInInvariantCulture = true, ErrorMessage = "Unsuccessful attempts must be 0 to 20")] public short MaxTryCount { get; set; } [Range(minimum: 0, maximum: 1440, ConvertValueInInvariantCulture = true, ErrorMessage = "Lock Time must be 0 to 1440")] public short LockTime { get; set; } [Required, NotNull, StringLength(maximumLength: 8, MinimumLength = 5, ErrorMessage = "Version must be 5 and 8 digits (Example: 0.0.0 or 99.99.99)")] public string AppVersion { get; set; } [Required, NotNull, StringLength(maximumLength: 15, MinimumLength = 5, ErrorMessage = "Comma delimited Auto Logout times (Example: 9999,9999,9999)")] public string AutoLogoutParams { get; set; } public string PwdReserveWords { get; set; } public bool LoginIdCantBePassword { get; set; } public bool PreventAttackPasswordReuse { get; set; } public bool BatchEnabled { get; set; } public int BmProcessId { get; set; } public int PrProcessId { get; set; } } public class WOTermsRequest { [Required, NotNull, StringLength(maximumLength: 2000, MinimumLength = 5, ErrorMessage = "Payment Terms must be between 5 and 2000 characters.")] public string PaymentTerms { get; set; } [Required, NotNull, StringLength(maximumLength: 2000, MinimumLength = 5, ErrorMessage = "Terms & Conditions must be between 5 and 2000 characters.")] public string TermsAndConditions { get; set; } } }