Initial commit
This commit is contained in:
22
backend/YPS.Beer/Models/Beer.cs
Normal file
22
backend/YPS.Beer/Models/Beer.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace YPS.Beer.Models;
|
||||
|
||||
public class Beer
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = null!;
|
||||
public string Tagline { get; set; } = null!;
|
||||
|
||||
[JsonPropertyName("first_brewed")]
|
||||
public string FirstBrewed { get; set; } = null!;
|
||||
public string Description { get; set; } = null!;
|
||||
|
||||
[JsonPropertyName("image_url")]
|
||||
public string ImageUrl { get; set; } = null!;
|
||||
public float Abv { get; set; }
|
||||
public float Iby { get; set; }
|
||||
|
||||
[JsonPropertyName("food_pairing")]
|
||||
public string[] FoodPairing { get; set; } = null!;
|
||||
}
|
||||
9
backend/YPS.Beer/Models/Favourite.cs
Normal file
9
backend/YPS.Beer/Models/Favourite.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace YPS.Beer.Models;
|
||||
|
||||
public class Favourite
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string UserId { get; set; } = null!;
|
||||
public User User { get; set; } = null!;
|
||||
public int BeerId { get; set; }
|
||||
}
|
||||
8
backend/YPS.Beer/Models/User.cs
Normal file
8
backend/YPS.Beer/Models/User.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
namespace YPS.Beer.Models;
|
||||
|
||||
public class User : IdentityUser
|
||||
{
|
||||
public ICollection<Favourite> Favourites { get; } = new List<Favourite>();
|
||||
}
|
||||
Reference in New Issue
Block a user