source: KernelRecordsMVC.Application/ViewModels/EditProductViewModel.cs

main
Last change on this file was d2eccb3, checked in by mmilevski <markomilevski3@…>, 4 weeks ago

Minor fixes.

  • Property mode set to 100644
File size: 858 bytes
Line 
1using System.ComponentModel.DataAnnotations;
2using KernelRecordsMVC.Domain.Enums;
3namespace KernelRecordsMVC.Application.ViewModels;
4
5public class EditProductViewModel
6{
7 public long ProductId { get; set; }
8
9 public long ReleaseId { get; set; }
10
11 public string ReleaseTitle { get; set; } = null!;
12
13 public ProductFormat Format { get; set; }
14
15 [Required]
16 [Range(0.01, 100000)]
17 public decimal Price { get; set; }
18
19 [Required]
20 [Display(Name = "Product Description")]
21 public string ProductDescription { get; set; } = null!;
22
23 [Required]
24 [Range(0, long.MaxValue)]
25 public long Stock { get; set; }
26
27 [Display(Name = "Discount (%)")]
28 [Range(0, 100)]
29 public decimal? Discount { get; set; }
30
31 [Required]
32 [Display(Name = "Modification Type")]
33 public ModificationType ModificationType { get; set; }
34}
Note: See TracBrowser for help on using the repository browser.