@@ -5,21 +5,36 @@ namespace CargoHub.Models
5
5
{
6
6
public class Warehouse : BaseModel , IContainsClassification
7
7
{
8
- public required string Code { get ; set ; }
9
- public required string Name { get ; set ; }
10
- public required string Address { get ; set ; }
11
- public required string Zip { get ; set ; }
12
- public required string City { get ; set ; }
13
- public required string Province { get ; set ; }
14
- public required string Country { get ; set ; }
8
+ [ JsonPropertyName ( "code" ) ]
9
+
10
+ public required string ? Code { get ; set ; }
11
+ [ JsonPropertyName ( "name" ) ]
12
+
13
+ public required string ? Name { get ; set ; }
14
+ [ JsonPropertyName ( "address" ) ]
15
+
16
+ public required string ? Address { get ; set ; }
17
+ [ JsonPropertyName ( "zip" ) ]
18
+
19
+ public required string ? Zip { get ; set ; }
20
+ [ JsonPropertyName ( "city" ) ]
21
+
22
+ public required string ? City { get ; set ; }
23
+ [ JsonPropertyName ( "province" ) ]
24
+
25
+ public required string ? Province { get ; set ; }
26
+ [ JsonPropertyName ( "country" ) ]
27
+
28
+ public required string ? Country { get ; set ; }
29
+
15
30
[ JsonIgnore ]
16
- public string ContactName { get ; set ; } = string . Empty ;
31
+ public string ? ContactName { get ; set ; } = string . Empty ;
17
32
18
33
[ JsonIgnore ]
19
- public string ContactPhone { get ; set ; } = string . Empty ;
34
+ public string ? ContactPhone { get ; set ; } = string . Empty ;
20
35
21
36
[ JsonIgnore ]
22
- public string ContactEmail { get ; set ; } = string . Empty ;
37
+ public string ? ContactEmail { get ; set ; } = string . Empty ;
23
38
24
39
[ NotMapped ]
25
40
// Contact dictionary for JSON serialization/deserialization
@@ -45,7 +60,7 @@ public class Warehouse : BaseModel, IContainsClassification
45
60
}
46
61
47
62
[ JsonIgnore ]
48
- public ICollection < Location > Locations { get ; } = [ ] ;
63
+ public ICollection < Location > Locations { get ; } = [ ] ;
49
64
[ JsonIgnore ]
50
65
public List < Classification > Classifications { get ; set ; } = [ ] ;
51
66
}
0 commit comments