summaryrefslogtreecommitdiff
path: root/DTOs
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2022-11-06 17:04:29 -0600
committerHombreLaser <sebastian-440@live.com>2022-11-06 17:04:29 -0600
commit8b40d27710e532a43aaf1eb198be64af1a2e576e (patch)
treecd2264d249e7cb4d1a9e3407d36d0db9680ef913 /DTOs
parent08819c6738a4f82ccf07ae5ed60835b087f7bb34 (diff)
Añadidos DTOs y AutomapperHEADmain
Diffstat (limited to 'DTOs')
-rw-r--r--DTOs/AddGroupRequest.cs5
-rw-r--r--DTOs/AuthenticationCredentials.cs6
-rw-r--r--DTOs/AuthenticationToken.cs6
-rw-r--r--DTOs/CreateGroup.cs10
-rw-r--r--DTOs/CreateUserAccount.cs10
-rw-r--r--DTOs/GroupDTO.cs6
-rw-r--r--DTOs/UserAccountDTO.cs7
7 files changed, 50 insertions, 0 deletions
diff --git a/DTOs/AddGroupRequest.cs b/DTOs/AddGroupRequest.cs
new file mode 100644
index 0000000..bce3ac2
--- /dev/null
+++ b/DTOs/AddGroupRequest.cs
@@ -0,0 +1,5 @@
+namespace LibraryAPI.DTOs {
+ public class AddGroupRequest {
+ public long Id { get; set; }
+ }
+} \ No newline at end of file
diff --git a/DTOs/AuthenticationCredentials.cs b/DTOs/AuthenticationCredentials.cs
new file mode 100644
index 0000000..65bc514
--- /dev/null
+++ b/DTOs/AuthenticationCredentials.cs
@@ -0,0 +1,6 @@
+namespace LibraryAPI.DTOs {
+ public class AuthenticationCredentials {
+ public string? Email { get; set; }
+ public string? Password { get; set; }
+ }
+}
diff --git a/DTOs/AuthenticationToken.cs b/DTOs/AuthenticationToken.cs
new file mode 100644
index 0000000..9014027
--- /dev/null
+++ b/DTOs/AuthenticationToken.cs
@@ -0,0 +1,6 @@
+namespace LibraryAPI.DTOs {
+ public class AuthenticationToken {
+ public string? Token { get; set; }
+ public DateTime Expiration { get; set; }
+ }
+}
diff --git a/DTOs/CreateGroup.cs b/DTOs/CreateGroup.cs
new file mode 100644
index 0000000..71cb77b
--- /dev/null
+++ b/DTOs/CreateGroup.cs
@@ -0,0 +1,10 @@
+using System.ComponentModel.DataAnnotations;
+using LibraryAPI.Validators;
+
+namespace LibraryAPI.DTOs {
+ public class CreateGroup {
+ [Required]
+ [Name]
+ public string? Name { get; set; }
+ }
+} \ No newline at end of file
diff --git a/DTOs/CreateUserAccount.cs b/DTOs/CreateUserAccount.cs
new file mode 100644
index 0000000..9e5359f
--- /dev/null
+++ b/DTOs/CreateUserAccount.cs
@@ -0,0 +1,10 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace LibraryAPI.DTOs {
+ public class CreateUserAccount {
+ [Required]
+ public string? Email { get; set; }
+ [Required]
+ public string? Password { get; set; }
+ }
+} \ No newline at end of file
diff --git a/DTOs/GroupDTO.cs b/DTOs/GroupDTO.cs
new file mode 100644
index 0000000..345c529
--- /dev/null
+++ b/DTOs/GroupDTO.cs
@@ -0,0 +1,6 @@
+namespace LibraryAPI.DTOs {
+ public class GroupDTO {
+ public long Id { get; set; }
+ public string? Name { get; set; }
+ }
+} \ No newline at end of file
diff --git a/DTOs/UserAccountDTO.cs b/DTOs/UserAccountDTO.cs
new file mode 100644
index 0000000..bb663de
--- /dev/null
+++ b/DTOs/UserAccountDTO.cs
@@ -0,0 +1,7 @@
+namespace LibraryAPI.DTOs {
+ public class UserAccountDTO {
+ public long Id { get; set; }
+ public string? Email { get; set; }
+ public List<GroupDTO>? Groups { get; set; }
+ }
+} \ No newline at end of file