21 lines
605 B
C#
21 lines
605 B
C#
using System.ComponentModel.DataAnnotations.Schema;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace WatchLog.Data
|
|
{
|
|
[PrimaryKey(nameof(SharedListId), nameof(UserId))]
|
|
public class LinkTableSharedUser
|
|
{
|
|
// --- Foreign Keys ---
|
|
public int SharedListId { get; set; }
|
|
public string? UserId { get; set; }
|
|
|
|
|
|
// --- Navigation Properties ---
|
|
[ForeignKey(nameof(SharedListId))]
|
|
public virtual SharedList SharedList { get; set; } = null!;
|
|
|
|
[ForeignKey(nameof(UserId))]
|
|
public virtual ApplicationUser User { get; set; } = null!;
|
|
}
|
|
} |