summaryrefslogtreecommitdiff
path: root/Forms/PrizeForm.cs
blob: 42074ad059bb2efaebb8cffcf84ab44b99f60ce4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using BackendPIA.Validations;

namespace BackendPIA.Forms {
    public class PrizeForm {
        [Required]
        [ForeignKey("RaffleId")]
        [IsNotClosed]
        [MaximumWinners]
        public long RaffleId { get; set; }
        [Required]
        public string? Name { get; set; }
        [Required]
        [UniqueTier]
        [Range(0, 53)]
        public int Tier { get; set; }
        [Required]
        public string? Category { get; set; }
    }
}