mirror of
https://github.com/QuotifyTeam/QuotifyBE.git
synced 2025-12-16 19:00:07 +01:00
feat: basic database model
This commit is contained in:
8
Entities/Category.cs
Normal file
8
Entities/Category.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace QuotifyBE.Entities
|
||||
{
|
||||
public class Category
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string? Name { get; set; }
|
||||
}
|
||||
}
|
||||
8
Entities/Image.cs
Normal file
8
Entities/Image.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace QuotifyBE.Entities
|
||||
{
|
||||
public class Image
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string? Url { get; set; }
|
||||
}
|
||||
}
|
||||
19
Entities/Quote.cs
Normal file
19
Entities/Quote.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace QuotifyBE.Entities
|
||||
{
|
||||
public class Quote
|
||||
{
|
||||
public int Id { get; set; }
|
||||
required public string Text { get; set; }
|
||||
required public string Author { get; set; }
|
||||
//public int CategoryId { get; set; }
|
||||
public int ImageId { get; set; }
|
||||
public DateTime CreatedAt { get; set; }
|
||||
public DateTime LastUpdatedAt { get; set; }
|
||||
public int UserId { get; set; }
|
||||
|
||||
public User? User { get; set; }
|
||||
public ICollection<QuoteCategory>? QuoteCategories = new List<QuoteCategory>();
|
||||
}
|
||||
}
|
||||
11
Entities/QuoteCategory.cs
Normal file
11
Entities/QuoteCategory.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace QuotifyBE.Entities
|
||||
{
|
||||
public class QuoteCategory
|
||||
{
|
||||
public int QuoteId { get; set; }
|
||||
public int CategoryId { get; set; }
|
||||
|
||||
public Quote? Quote { get; set; }
|
||||
public Category? Category { get; set; }
|
||||
}
|
||||
}
|
||||
10
Entities/User.cs
Normal file
10
Entities/User.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace QuotifyBE.Entities
|
||||
{
|
||||
public class User
|
||||
{
|
||||
public int Id { get; set; }
|
||||
required public string Name { get; set; }
|
||||
required public string Email { get; set; }
|
||||
required public string PasswordHash { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user