21 lines
612 B
C#
21 lines
612 B
C#
using System.ComponentModel.DataAnnotations.Schema;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace WatchLog.Data
|
|
{
|
|
[PrimaryKey(nameof(PrivateEntityId), nameof(LabelId))]
|
|
public class LinkTablePrivateLabel
|
|
{
|
|
// --- Foreign Keys ---
|
|
public int PrivateEntityId { get; set; }
|
|
public int LabelId { get; set; }
|
|
|
|
|
|
// --- Navigation Properties ---
|
|
[ForeignKey(nameof(PrivateEntityId))]
|
|
public virtual PrivateEntity PrivateEntity { get; set; } = null!;
|
|
|
|
[ForeignKey(nameof(LabelId))]
|
|
public virtual Label Label { get; set; } = null!;
|
|
}
|
|
} |