File tree Expand file tree Collapse file tree 11 files changed +27
-15
lines changed Expand file tree Collapse file tree 11 files changed +27
-15
lines changed Original file line number Diff line number Diff line change 1
1
[
2
2
{
3
3
"Type" : " truck" ,
4
- "Capacity" : 15000.00 ,
4
+ "Capacity" : 7000.00 ,
5
+ "UsedCapacity" : 1000.00 ,
6
+ "NotUsedCapacity" : 6000.00 ,
5
7
"IsAvailable" : true
6
8
},
7
9
{
8
10
"Type" : " van" ,
9
11
"Capacity" : 5000.00 ,
12
+ "UsedCapacity" : 5000.00 ,
13
+ "NotUsedCapacity" : 0.00 ,
10
14
"IsAvailable" : false
11
15
},
12
16
{
13
17
"Type" : " truck" ,
14
- "Capacity" : 30000.00 ,
18
+ "Capacity" : 7000.00 ,
19
+ "UsedCapacity" : 1000.00 ,
20
+ "NotUsedCapacity" : 6000.00 ,
15
21
"IsAvailable" : true
16
22
},
17
23
{
18
24
"Type" : " van" ,
19
- "Capacity" : 2000.00 ,
25
+ "Capacity" : 5000.00 ,
26
+ "UsedCapacity" : 1000.00 ,
27
+ "NotUsedCapacity" : 4000.00 ,
20
28
"IsAvailable" : true
21
29
},
22
30
{
23
31
"Type" : " van" ,
24
- "Capacity" : 12000.00 ,
32
+ "Capacity" : 7000.00 ,
33
+ "UsedCapacity" : 7000.00 ,
34
+ "NotUsedCapacity" : 0.00 ,
25
35
"IsAvailable" : false
26
36
}
27
37
]
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ public class OrderDto : BaseDto
10
10
public VehicleDto ? Vehicle { get ; set ; }
11
11
public IEnumerable < OrderItemDto > Items { get ; set ; } = new List < OrderItemDto > ( ) ;
12
12
public decimal TotalVolume { get ; init ; }
13
+ public decimal TotalPrice { get ; init ; }
13
14
public DateTime OrderDate { get ; init ; }
14
15
public DateTime DeliveryDate { get ; init ; }
15
16
public OrderStatus Status { get ; init ; }
Original file line number Diff line number Diff line change @@ -6,5 +6,4 @@ public class OrderItemDto : BaseDto
6
6
public int ProductId { get ; init ; }
7
7
public ProductDto ? Product { get ; init ; }
8
8
public int Quantity { get ; init ; }
9
- public decimal UnitPrice { get ; init ; }
10
9
}
Original file line number Diff line number Diff line change @@ -4,5 +4,5 @@ public class ProductDto : BaseDto
4
4
{
5
5
public string Name { get ; init ; } = string . Empty ;
6
6
public decimal Price { get ; init ; }
7
- public decimal Weight { get ; init ; }
7
+ public decimal Volume { get ; init ; }
8
8
}
Original file line number Diff line number Diff line change @@ -6,5 +6,5 @@ public class VehicleDto : BaseDto
6
6
public decimal Capacity { get ; init ; }
7
7
public decimal UsedCapacity { get ; set ; }
8
8
public decimal NotUsedCapacity { get ; set ; }
9
- public bool IsAvailable { get ; init ; }
9
+ public bool IsAvailable { get ; set ; }
10
10
}
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ public class Order : BaseEntity
8
8
public Vehicle ? Vehicle { get ; init ; }
9
9
public IEnumerable < OrderItem > Items { get ; init ; } = new List < OrderItem > ( ) ;
10
10
public decimal TotalVolume { get ; init ; }
11
+ public decimal TotalPrice { get ; init ; }
11
12
public DateTime OrderDate { get ; init ; }
12
13
public DateTime DeliveryDate { get ; init ; }
13
14
public OrderStatus Status { get ; set ; }
Original file line number Diff line number Diff line change @@ -7,5 +7,4 @@ public class OrderItem : BaseEntity
7
7
public int ProductId { get ; init ; }
8
8
public Product ? Product { get ; init ; }
9
9
public int Quantity { get ; init ; }
10
- public decimal UnitPrice { get ; init ; }
11
10
}
Original file line number Diff line number Diff line change @@ -4,6 +4,6 @@ public class Product : BaseEntity
4
4
{
5
5
public string Name { get ; init ; } = string . Empty ;
6
6
public decimal Price { get ; init ; }
7
- public decimal Weight { get ; init ; }
7
+ public decimal Volume { get ; init ; }
8
8
public ProductStock ? Stock { get ; set ; }
9
9
}
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ public OrderItemDto MapToDto(OrderItem entity)
18
18
ProductId = entity . ProductId ,
19
19
Product = entity . Product != null ? productMapper . MapToDto ( entity . Product ) : null ,
20
20
Quantity = entity . Quantity ,
21
- UnitPrice = entity . UnitPrice
22
21
} ;
23
22
}
24
23
@@ -31,7 +30,6 @@ public OrderItem MapToEntity(OrderItemDto dto)
31
30
OrderId = dto . OrderId ,
32
31
ProductId = dto . ProductId ,
33
32
Quantity = dto . Quantity ,
34
- UnitPrice = dto . UnitPrice
35
33
} ;
36
34
}
37
35
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ public ProductDto MapToDto(Product entity)
15
15
Id = entity . Id ,
16
16
Name = entity . Name ,
17
17
Price = entity . Price ,
18
- Weight = entity . Weight
18
+ Volume = entity . Volume
19
19
} ;
20
20
}
21
21
@@ -27,7 +27,7 @@ public Product MapToEntity(ProductDto dto)
27
27
Id = dto . Id ,
28
28
Name = dto . Name ,
29
29
Price = dto . Price ,
30
- Weight = dto . Weight
30
+ Volume = dto . Volume
31
31
} ;
32
32
}
33
33
You can’t perform that action at this time.
0 commit comments