using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace CouchLog.Data
{
    [PrimaryKey(nameof(GlobalEntityId), nameof(GenreId))]
    public class LinkTableGlobalGenre
    {
        // --- Foreign Keys ---
        [Column(Order = 0)]
        public int GlobalEntityId { get; set; }

        [Column(Order = 1)]
        public int GenreId { get; set; }


        // --- Navigation Properties ---
        [ForeignKey(nameof(GlobalEntityId))]
        public virtual GlobalEntity GlobalEntity { get; set; } = null!;

        [ForeignKey(nameof(GenreId))]
        public virtual Genre Genre { get; set; } = null!;
    }
}