Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Phase 1: Initial modeling

  • Loading branch information...
commit 93ec65bbb3ec81811ca97cb9865d908551feb434 1 parent c3f1e73
Itamar Syn-Hershko authored
5 EventsZilla/EventsZilla.csproj
View
@@ -99,6 +99,11 @@
<DependentUpon>Global.asax</DependentUpon>
</Compile>
<Compile Include="Models\ContentPage.cs" />
+ <Compile Include="Models\Event.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="Models\Presenter.cs" />
+ <Compile Include="Models\Venue.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
56 EventsZilla/Models/Event.cs
View
@@ -0,0 +1,56 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace EventsZilla.Models
+{
+ public class Event
+ {
+ public Event()
+ {
+ Schedule = new List<ScheduleSlot>();
+ }
+
+ public int Id { get; set; }
+ public string Title { get; set; }
+ public string Slug { get; set; }
+ public string Description { get; set; } // markdown content
+
+ public string VenueId { get; set; }
+
+ public DateTimeOffset CreatedAt { get; set; }
+
+ public DateTimeOffset RegistrationOpens { get; set; }
+ public DateTimeOffset RegistrationCloses { get; set; }
+ public int AvailableSeats { get; set; }
+
+ public class ScheduleSlot
+ {
+ public List<string> PresenterIds { get; set; } // list of person IDs
+ public string Title { get; set; }
+ public string Brief { get; set; } // markdown
+ public DateTimeOffset StartingAt { get; set; }
+ public DateTimeOffset EndingAt { get; set; }
+
+ }
+ public List<ScheduleSlot> Schedule { get; set; }
+
+ public DateTimeOffset StartsAt
+ {
+ get
+ {
+ var firstSession = Schedule.OrderBy(x => x.StartingAt).FirstOrDefault();
+ return firstSession == null ? DateTimeOffset.MinValue : firstSession.StartingAt;
+ }
+ }
+
+ public DateTimeOffset EndsAt
+ {
+ get
+ {
+ var lastSession = Schedule.OrderByDescending(x => x.EndingAt).FirstOrDefault();
+ return lastSession == null ? DateTimeOffset.MaxValue : lastSession.EndingAt;
+ }
+ }
+ }
+}
9 EventsZilla/Models/Presenter.cs
View
@@ -0,0 +1,9 @@
+namespace EventsZilla.Models
+{
+ public class Presenter
+ {
+ public string Name { get; set; }
+ public string Bio { get; set; }
+ public string ImageUrl { get; set; }
+ }
+}
11 EventsZilla/Models/Venue.cs
View
@@ -0,0 +1,11 @@
+namespace EventsZilla.Models
+{
+ public class Venue
+ {
+ public string Name { get; set; }
+ public string Location { get; set; }
+
+ public decimal Longitude { get; set; }
+ public decimal Latitude { get; set; }
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.