mirror of
https://github.com/Ikatono/ComiServ.git
synced 2025-10-28 20:45:35 -05:00
Rearranged repo to make room for additional projects
This commit is contained in:
20
ComiServ/Entities/ComicAuthor.cs
Normal file
20
ComiServ/Entities/ComicAuthor.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace ComiServ.Entities;
|
||||
|
||||
[PrimaryKey("ComicId", "AuthorId")]
|
||||
[Index("ComicId")]
|
||||
[Index("AuthorId")]
|
||||
public class ComicAuthor
|
||||
{
|
||||
[ForeignKey(nameof(Comic))]
|
||||
public int ComicId { get; set; }
|
||||
[Required]
|
||||
public Comic Comic { get; set; } = null!;
|
||||
[ForeignKey(nameof(Author))]
|
||||
public int AuthorId { get; set; }
|
||||
[Required]
|
||||
public Author Author { get; set; } = null!;
|
||||
}
|
||||
Reference in New Issue
Block a user