-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTypeDefinitions.cs
More file actions
92 lines (85 loc) · 2.23 KB
/
TypeDefinitions.cs
File metadata and controls
92 lines (85 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
using NpgsqlTypes;
using System.ComponentModel;
namespace Rezervace
{
public enum Sex
{
[PgName("Male")]
Male,
[PgName("Female")]
Female,
[PgName("Other")]
Other,
[PgName("Undefined")]
Undefined
}
public enum FuelType
{
[PgName("diesel")]
Diesel,
[PgName("benzin")]
Benzin,
[PgName("gas")]
Gas,
[PgName("electric")]
Electric
}
public enum VehicleClass
{
[PgName("Premium")]
Premium,
[PgName("Business")]
Business,
[PgName("Economy")]
Economy
}
public struct UserDataDto
{
public string? name;
public string? surname;
public int? licence;
public DateTime? dob;
public Sex? sex;
}
public struct VehicleDTO
{
[Browsable(false)]
public int Id { get; set; }
public string Brand { get; set; }
public string Model { get; set; }
public FuelType Type { get; set; }
public int Seats { get; set; }
public int PricePerDay { get; set; }
public VehicleClass VClass { get; set; }
}
public struct FilterDTO
{
public string? Brand { get; set; }
public string? Model { get; set; }
public FuelType? Type { get; set; }
public int? MinSeats { get; set; }
public int? MaxSeats { get; set; }
public int? MinPricePerDay { get; set; }
public int? MaxPricePerDay { get; set; }
public VehicleClass? VClass { get; set; }
public DateTime From { get; set; }
public DateTime To { get; set; }
}
public struct ReservationDTO
{
public int VehicleId { get; set; }
public DateTime FromDate { get; set; }
public DateTime ToDate { get; set; }
}
public struct ReservationDetailsDTO
{
public int Id { get; set; }
public string Username { get; set; }
public string Brand { get; set; }
public string Model { get; set; }
public FuelType Type { get; set; }
public DateTime FromDate { get; set; }
public DateTime ToDate { get; set; }
public int PricePerDay { get; set; }
}
}