Skip to content

Commit

Permalink
Merge pull request #4 from wzarek/RSN-8
Browse files Browse the repository at this point in the history
RSN-8 Scaffolded database
  • Loading branch information
bilimig authored Mar 27, 2024
2 parents 0074dea + 346432c commit b6395e8
Show file tree
Hide file tree
Showing 17 changed files with 664 additions and 1 deletion.
23 changes: 23 additions & 0 deletions Server/ReasnAPI/ReasnAPI/Models/Database/Address.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;

namespace ReasnAPI.Models.Database;

public partial class Address
{
public int Id { get; set; }

public string City { get; set; } = null!;

public string Country { get; set; } = null!;

public string Street { get; set; } = null!;

public string State { get; set; } = null!;

public string? ZipCode { get; set; }

public virtual ICollection<Event> Events { get; set; } = new List<Event>();

public virtual ICollection<User> Users { get; set; } = new List<User>();
}
21 changes: 21 additions & 0 deletions Server/ReasnAPI/ReasnAPI/Models/Database/Comment.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;

namespace ReasnAPI.Models.Database;

public partial class Comment
{
public int Id { get; set; }

public int EventId { get; set; }

public string Content { get; set; } = null!;

public DateTime CreatedAt { get; set; }

public int UserId { get; set; }

public virtual Event Event { get; set; } = null!;

public virtual User User { get; set; } = null!;
}
39 changes: 39 additions & 0 deletions Server/ReasnAPI/ReasnAPI/Models/Database/Event.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;

namespace ReasnAPI.Models.Database;

public partial class Event
{
public int Id { get; set; }

public string Name { get; set; } = null!;

public int AddressId { get; set; }

public string Description { get; set; } = null!;

public int OrganizerId { get; set; }

public DateTime StartAt { get; set; }

public DateTime EndAt { get; set; }

public DateTime CreatedAt { get; set; }

public DateTime UpdatedAt { get; set; }

public string Slug { get; set; } = null!;

public int StatusId { get; set; }

public virtual Address Address { get; set; } = null!;

public virtual ICollection<Comment> Comments { get; set; } = new List<Comment>();

public virtual User Organizer { get; set; } = null!;

public virtual ICollection<Participant> Participants { get; set; } = new List<Participant>();

public virtual Status Status { get; set; } = null!;
}
15 changes: 15 additions & 0 deletions Server/ReasnAPI/ReasnAPI/Models/Database/EventParameter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;

namespace ReasnAPI.Models.Database;

public partial class EventParameter
{
public int ParameterId { get; set; }

public int EventId { get; set; }

public virtual Event Event { get; set; } = null!;

public virtual Parameter Parameter { get; set; } = null!;
}
15 changes: 15 additions & 0 deletions Server/ReasnAPI/ReasnAPI/Models/Database/EventTag.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;

namespace ReasnAPI.Models.Database;

public partial class EventTag
{
public int EventId { get; set; }

public int TagId { get; set; }

public virtual Event Event { get; set; } = null!;

public virtual Tag Tag { get; set; } = null!;
}
17 changes: 17 additions & 0 deletions Server/ReasnAPI/ReasnAPI/Models/Database/Image.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;

namespace ReasnAPI.Models.Database;

public partial class Image
{
public int Id { get; set; }

public byte[] ImageData { get; set; } = null!;

public int ObjectTypeId { get; set; }

public int ObjectId { get; set; }

public virtual ObjectType ObjectType { get; set; } = null!;
}
13 changes: 13 additions & 0 deletions Server/ReasnAPI/ReasnAPI/Models/Database/Interest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;

namespace ReasnAPI.Models.Database;

public partial class Interest
{
public int Id { get; set; }

public string Name { get; set; } = null!;

public int Level { get; set; }
}
15 changes: 15 additions & 0 deletions Server/ReasnAPI/ReasnAPI/Models/Database/ObjectType.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;

namespace ReasnAPI.Models.Database;

public partial class ObjectType
{
public int Id { get; set; }

public string Name { get; set; } = null!;

public virtual ICollection<Image> Images { get; set; } = new List<Image>();

public virtual ICollection<Status> Statuses { get; set; } = new List<Status>();
}
13 changes: 13 additions & 0 deletions Server/ReasnAPI/ReasnAPI/Models/Database/Parameter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;

namespace ReasnAPI.Models.Database;

public partial class Parameter
{
public int Id { get; set; }

public string Key { get; set; } = null!;

public string Value { get; set; } = null!;
}
21 changes: 21 additions & 0 deletions Server/ReasnAPI/ReasnAPI/Models/Database/Participant.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;

namespace ReasnAPI.Models.Database;

public partial class Participant
{
public int Id { get; set; }

public int EventId { get; set; }

public int UserId { get; set; }

public int StatusId { get; set; }

public virtual Event Event { get; set; } = null!;

public virtual Status Status { get; set; } = null!;

public virtual User User { get; set; } = null!;
}
Loading

0 comments on commit b6395e8

Please sign in to comment.