| | | 1 | | using System; |
| | | 2 | | using System.Collections.Generic; |
| | | 3 | | using System.Linq; |
| | | 4 | | using System.Threading.Tasks; |
| | | 5 | | using System.ComponentModel.DataAnnotations; |
| | | 6 | | using System.Runtime.Serialization; |
| | | 7 | | using WinSolutions.Sveta.Server.Data.DataModel.Entities; |
| | | 8 | | using SVETA.Api.Validation; |
| | | 9 | | |
| | | 10 | | namespace SVETA.Api.Data.DTO.DiscountColorDTO |
| | | 11 | | { |
| | | 12 | | public class DiscountColorRequestDTO |
| | | 13 | | { |
| | | 14 | | [DigitValidate] |
| | | 15 | | [Display(Name = "Уровень скидки")] |
| | 0 | 16 | | public int DiscountLevel { get; set; } |
| | | 17 | | [StringLength (maximumLength:7, MinimumLength = 7, ErrorMessage = "Цвет скидки должен состоять из решетки и 6 си |
| | 0 | 18 | | public string Color { get; set; } |
| | | 19 | | [StringLength(maximumLength: 7, MinimumLength = 7, ErrorMessage = "Цвет текста скидки должен состоять из решетки |
| | 0 | 20 | | public string TextColor { get; set; } |
| | | 21 | | [Range(typeof(decimal), "0", "1", ErrorMessage = "Значение прозрачности должно быть между 0 и 1")] |
| | 0 | 22 | | public decimal Transparency { get; set; } |
| | | 23 | | } |
| | | 24 | | } |