-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDomain.Event.cs
More file actions
160 lines (117 loc) · 3.62 KB
/
Domain.Event.cs
File metadata and controls
160 lines (117 loc) · 3.62 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Events.Calendar.Domain
{
public class Country : EntityBase
{
[MaxLength(50)]
public string? IsoCode { get; set; }
}
public class City : EntityBase
{
[ForeignKey("Country")]
public Guid CountryId { get; set; }
[MaxLength(50)]
public string? IsoCode { get; set; }
}
public class Location : EntityBase
{
[ForeignKey("City")]
public Guid CityId { get; set; }
[MaxLength(50)]
public string? IsoCode { get; set; }
[Required]
[MaxLength(500)]
public required string? Description { get; set; }
[Required]
public required double? MapsLongitude { get; set; }
[Required]
public required double? MapsLatitude { get; set; }
//public object CountryId { get; internal set; }
}
public class Event : EntityBase
{
[Required]
[MaxLength(500)]
public required string Description { get; set; }
[MaxLength(50000)]
public string? DescriptionFull { get; set; }
public DateTime? DatePlanned { get; set; }
public DateTime? DatePlannedEnd { get; set; }
[MaxLength(50)]
public string? ContactMobile { get; set; }
[MaxLength(100)]
public string? ContactEmail { get; set; }
[MaxLength(50)]
public string? ContactWebsite { get; set; }
public int? Popularity { get; set; }
public int? ExpectedAudiance { get; set; }
public bool? IsFree { get; set; }
public decimal? EntryFee { get; set; }
[ForeignKey("SystemUser")]
public Guid SystemUserId { get; set; }
[ForeignKey("Location")]
public Guid LocationId { get; set; }
}
public class EventRating : EntityBase
{
[ForeignKey("Event")]
public Guid EventId { get; set; }
[Required]
[MaxLength(255)]
public required string Description { get; set; }
[Required]
public int Rating { get; set; }
[ForeignKey("SystemUser")]
public Guid SystemUserId { get; set; }
}
public class EventTag : EntityBase
{
[ForeignKey("Event")]
public Guid EventId { get; set; }
[Required]
[MaxLength(100)]
public required string Tag { get; set; }
[ForeignKey("SystemUser")]
public Guid SystemUserId { get; set; }
}
public class EventPics : EntityBase
{
[ForeignKey("Event")]
public Guid EventId { get; set; }
[Required]
[MaxLength(255)]
public required string Description { get; set; }
[Required]
[MaxLength(255)]
public string? Url { get; set; }
[Required]
public EventPicsType EventPicsType { get; set; }
[ForeignKey("SystemUser")]
public Guid SystemUserId { get; set; }
}
public class Timeslot : EntityBase
{
[Required]
[MaxLength(255)]
public required string Description { get; set; }
public DateTime StartTime { get; set; }
public DateTime EndTime { get; set; }
[MaxLength(255)]
public string? Timezone { get; set; }
public bool? IsFree { get; set; }
}
public class EventTimeslot : EntityBase
{
[ForeignKey("Event")]
public Guid EventId { get; set; }
[ForeignKey("SystemUser")]
public Guid SystemUserId { get; set; }
}
public enum EventPicsType
{
Picture = 1,
Video = 2,
Links = 3
}
}