main
|
Last change
on this file since 08aefc6 was 08aefc6, checked in by mmilevski <markomilevski3@…>, 4 weeks ago |
|
Initial commit
|
-
Property mode
set to
100644
|
|
File size:
860 bytes
|
| Line | |
|---|
| 1 | namespace KernelRecordsMVC.Application.ViewModels;
|
|---|
| 2 |
|
|---|
| 3 | using System.ComponentModel.DataAnnotations;
|
|---|
| 4 | using KernelRecordsMVC.Domain.Enums;
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 | public class EditProductViewModel
|
|---|
| 8 | {
|
|---|
| 9 | public long ProductId { get; set; }
|
|---|
| 10 |
|
|---|
| 11 | public long ReleaseId { get; set; }
|
|---|
| 12 |
|
|---|
| 13 | public string ReleaseTitle { get; set; } = null!;
|
|---|
| 14 |
|
|---|
| 15 | public ProductFormat Format { get; set; }
|
|---|
| 16 |
|
|---|
| 17 | [Required]
|
|---|
| 18 | [Range(0.01, 100000)]
|
|---|
| 19 | public decimal Price { get; set; }
|
|---|
| 20 |
|
|---|
| 21 | [Required]
|
|---|
| 22 | [Display(Name = "Product Description")]
|
|---|
| 23 | public string ProductDescription { get; set; } = null!;
|
|---|
| 24 |
|
|---|
| 25 | [Required]
|
|---|
| 26 | [Range(0, long.MaxValue)]
|
|---|
| 27 | public long Stock { get; set; }
|
|---|
| 28 |
|
|---|
| 29 | [Display(Name = "Discount (%)")]
|
|---|
| 30 | [Range(0, 100)]
|
|---|
| 31 | public decimal? Discount { get; set; }
|
|---|
| 32 |
|
|---|
| 33 | [Required]
|
|---|
| 34 | [Display(Name = "Modification Type")]
|
|---|
| 35 | public ModificationType ModificationType { get; set; }
|
|---|
| 36 | } |
|---|
Note:
See
TracBrowser
for help on using the repository browser.