summaryrefslogtreecommitdiff
path: root/Forms
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2022-11-22 18:01:02 -0600
committerHombreLaser <sebastian-440@live.com>2022-11-22 18:01:02 -0600
commit17b13d82dd0cd4ceba513d3354ade9420528e7bf (patch)
tree71b88eb5a0fb15790364484ee2cac6f801291db9 /Forms
parent214cd4db690635ba2a30183c1679c3e4d7b8e896 (diff)
Añadido método show en el controlador de usuarios
Diffstat (limited to 'Forms')
-rw-r--r--Forms/RaffleDTO.cs8
-rw-r--r--Forms/TicketDTO.cs8
-rw-r--r--Forms/TicketForm.cs13
-rw-r--r--Forms/UserAccountDTO.cs8
4 files changed, 37 insertions, 0 deletions
diff --git a/Forms/RaffleDTO.cs b/Forms/RaffleDTO.cs
new file mode 100644
index 0000000..b7e151d
--- /dev/null
+++ b/Forms/RaffleDTO.cs
@@ -0,0 +1,8 @@
+namespace BackendPIA.Forms {
+ public class RaffleDTO {
+ public long Id { get; set; }
+ public string? Name { get; set; }
+ public int Winners { get; set; }
+ public bool IsClosed { get; set; }
+ }
+} \ No newline at end of file
diff --git a/Forms/TicketDTO.cs b/Forms/TicketDTO.cs
new file mode 100644
index 0000000..0732708
--- /dev/null
+++ b/Forms/TicketDTO.cs
@@ -0,0 +1,8 @@
+namespace BackendPIA.Forms {
+ public class TicketDTO {
+ public long Id { get; set; }
+ public int Number { get; set; }
+ public bool IsWinner { get; set; }
+ public long RaffleId { get; set; }
+ }
+} \ No newline at end of file
diff --git a/Forms/TicketForm.cs b/Forms/TicketForm.cs
new file mode 100644
index 0000000..26e7302
--- /dev/null
+++ b/Forms/TicketForm.cs
@@ -0,0 +1,13 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace BackendPIA.Forms {
+ public class TicketForm {
+ [Required]
+ [Range(1, 54, ErrorMessage = "Value for {0} must be between {1} and {2}.")]
+ public int Number { get; set; }
+ [Required]
+ public long UserAccountId { get; set; }
+ [Required]
+ public long RaffleId { get; set; }
+ }
+} \ No newline at end of file
diff --git a/Forms/UserAccountDTO.cs b/Forms/UserAccountDTO.cs
new file mode 100644
index 0000000..06b0df7
--- /dev/null
+++ b/Forms/UserAccountDTO.cs
@@ -0,0 +1,8 @@
+namespace BackendPIA.Forms {
+ public class UserAccountDTO {
+ public string Id { get; set; }
+ public string? Email { get; set; }
+ public string? UserName { get; set; }
+ public ICollection<TicketDTO>? Tickets { get; set; }
+ }
+} \ No newline at end of file