From dd6a373a59cf9dea8cfabff33a92b40ee3426923 Mon Sep 17 00:00:00 2001
From: snemeckayova <514641@mail.muni.cz>
Date: Tue, 5 Nov 2024 17:30:59 +0100
Subject: [PATCH] Add EventParticipant DTOs

---
 .../EventParticipantCreateDTO.cs                | 17 +++++++++++++++++
 .../EventParticipant/EventParticipantDTO.cs     | 17 +++++++++++++++++
 .../EventParticipantUpdateDTO.cs                | 11 +++++++++++
 3 files changed, 45 insertions(+)
 create mode 100644 BusinessLayer/DTOs/EventParticipant/EventParticipantCreateDTO.cs
 create mode 100644 BusinessLayer/DTOs/EventParticipant/EventParticipantDTO.cs
 create mode 100644 BusinessLayer/DTOs/EventParticipant/EventParticipantUpdateDTO.cs

diff --git a/BusinessLayer/DTOs/EventParticipant/EventParticipantCreateDTO.cs b/BusinessLayer/DTOs/EventParticipant/EventParticipantCreateDTO.cs
new file mode 100644
index 0000000..3b176a8
--- /dev/null
+++ b/BusinessLayer/DTOs/EventParticipant/EventParticipantCreateDTO.cs
@@ -0,0 +1,17 @@
+using DAL.Enums;
+using System.ComponentModel.DataAnnotations;
+
+namespace BusinessLayer.DTOs.EventParticipant
+{
+    public class EventParticipantCreateDTO
+    {
+        [Required]
+        public Guid UserId { get; set; }
+
+        [Required]
+        public Guid EventId { get; set; }
+
+        [Required]
+        public ParticipantType Attendance { get; set; }
+    }
+}
diff --git a/BusinessLayer/DTOs/EventParticipant/EventParticipantDTO.cs b/BusinessLayer/DTOs/EventParticipant/EventParticipantDTO.cs
new file mode 100644
index 0000000..0132b78
--- /dev/null
+++ b/BusinessLayer/DTOs/EventParticipant/EventParticipantDTO.cs
@@ -0,0 +1,17 @@
+using BusinessLayer.DTOs.Event;
+using BusinessLayer.DTOs.User;
+using DAL.Enums;
+
+namespace BusinessLayer.DTOs.EventParticipant
+{
+    public class EventParticipantDTO
+    {
+        public Guid Id { get; set; }
+        public required UserDTO User { get; set; }
+        public required EventDTO Event { get; set; }
+        public ParticipantType Attendance { get; set; }
+        public DateTime CreatedAt { get; set; }
+        public DateTime UpdatedAt { get; set; }
+        public DateTime? DeletedAt { get; set; }
+    }
+}
diff --git a/BusinessLayer/DTOs/EventParticipant/EventParticipantUpdateDTO.cs b/BusinessLayer/DTOs/EventParticipant/EventParticipantUpdateDTO.cs
new file mode 100644
index 0000000..69f2298
--- /dev/null
+++ b/BusinessLayer/DTOs/EventParticipant/EventParticipantUpdateDTO.cs
@@ -0,0 +1,11 @@
+using DAL.Enums;
+using System.ComponentModel.DataAnnotations;
+
+namespace BusinessLayer.DTOs.EventParticipant
+{
+    public class EventParticipantUpdateDTO
+    {
+        [Required]
+        public ParticipantType Attendance { get; set; }
+    }
+}
\ No newline at end of file
-- 
GitLab