File tree Expand file tree Collapse file tree 7 files changed +125
-0
lines changed Expand file tree Collapse file tree 7 files changed +125
-0
lines changed Original file line number Diff line number Diff line change
1
+ using System ;
2
+ using System . Collections . Generic ;
3
+ using System . ComponentModel . DataAnnotations ;
4
+ using System . Linq ;
5
+ using System . Threading . Tasks ;
6
+
7
+ namespace Supermarket . V1 . Dtos . AccountDtos
8
+ {
9
+ public class LoginDto
10
+ {
11
+ [ Required ]
12
+ [ EmailAddress ]
13
+ public string Email { get ; set ; }
14
+
15
+ [ Required ]
16
+ public string Password { get ; set ; }
17
+ }
18
+ }
Original file line number Diff line number Diff line change
1
+ using System ;
2
+ using System . Collections . Generic ;
3
+ using System . ComponentModel . DataAnnotations ;
4
+ using System . Linq ;
5
+ using System . Threading . Tasks ;
6
+
7
+ namespace Supermarket . V1 . Dtos . AccountDtos
8
+ {
9
+ public class RegisterDto
10
+ {
11
+ [ Required ]
12
+ [ DataType ( DataType . EmailAddress ) ]
13
+ [ EmailAddress ]
14
+ public string Email { get ; set ; }
15
+
16
+ [ Required ]
17
+ [ DataType ( DataType . Password ) ]
18
+ public string Password { get ; set ; }
19
+
20
+ [ Required ]
21
+ [ Compare ( "Password" ) ]
22
+ [ DataType ( DataType . Password ) ]
23
+ public string ConfirmPassword { get ; set ; }
24
+
25
+ [ Required ]
26
+ public string FullName { get ; set ; }
27
+ }
28
+ }
Original file line number Diff line number Diff line change
1
+ using System ;
2
+ using System . Collections . Generic ;
3
+ using System . Linq ;
4
+ using System . Threading . Tasks ;
5
+
6
+ namespace Supermarket . V1 . Dtos . AccountDtos
7
+ {
8
+ public class UserInfoDto
9
+ {
10
+ public string FullName { get ; set ; }
11
+
12
+ public string Email { get ; set ; }
13
+ }
14
+ }
Original file line number Diff line number Diff line change
1
+ using System ;
2
+ using System . Collections . Generic ;
3
+ using System . Linq ;
4
+ using System . Threading . Tasks ;
5
+
6
+ namespace Supermarket . V1 . Dtos . CategoryDtos
7
+ {
8
+ public class CategoryDto
9
+ {
10
+ public int Id { get ; set ; }
11
+
12
+ public string Name { get ; set ; }
13
+
14
+ public DateTime DateAdded { get ; set ; }
15
+
16
+ public DateTime DateModified { get ; set ; }
17
+ }
18
+ }
Original file line number Diff line number Diff line change
1
+ using System ;
2
+ using System . ComponentModel . DataAnnotations ;
3
+
4
+ namespace Supermarket . V1 . Dtos . CategoryDtos
5
+ {
6
+ public class CreateCategoryDto
7
+ {
8
+ [ Required ]
9
+ [ MaxLength ( 30 ) ]
10
+ public string Name { get ; set ; }
11
+
12
+ public DateTime DateAdded { get ; private set ; } = DateTime . Now ;
13
+
14
+ public DateTime DateModified { get ; private set ; } = DateTime . Now ;
15
+ }
16
+ }
Original file line number Diff line number Diff line change
1
+ using System ;
2
+ using System . ComponentModel . DataAnnotations ;
3
+
4
+ namespace Supermarket . V1 . Dtos . CategoryDtos
5
+ {
6
+ public class SaveCategoryDto
7
+ {
8
+ [ Required ]
9
+ [ MaxLength ( 30 ) ]
10
+ public string Name { get ; set ; }
11
+
12
+ public DateTime DateModified { get ; private set ; } = DateTime . Now ;
13
+ }
14
+ }
Original file line number Diff line number Diff line change
1
+ using Supermarket . V1 . Dtos . CategoryDtos ;
2
+
3
+ namespace Supermarket . V1 . Dtos . ProductDtos
4
+ {
5
+ public class ProductDto
6
+ {
7
+ public int Id { get ; set ; }
8
+
9
+ public string Name { get ; set ; }
10
+
11
+ public int QuantityInPackage { get ; set ; }
12
+
13
+ public string UnitOfMeasurement { get ; set ; }
14
+
15
+ public CategoryDto Category { get ; set ; }
16
+ }
17
+ }
You can’t perform that action at this time.
0 commit comments