continuity/Continuity.AuthServer/DB/Documents/GuildMember.cs
Timothy Schenk 3a24dabdf2
chore: formatting and slnx
Signed-off-by: Timothy Schenk <admin@rainote.dev>
2025-01-16 14:30:40 +01:00

30 lines
851 B
C#

// Licensed to Timothy Schenk under the GNU AGPL Version 3 License.
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;
namespace Continuity.AuthServer.DB.Documents;
[Index(nameof(Id), IsUnique = true)]
public class GuildMember {
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public Guid Id { get; set; }
public virtual Guid CharacterId { get; set; }
[DeleteBehavior(DeleteBehavior.Restrict)]
[ForeignKey(nameof(CharacterId))]
[Required]
public virtual Character Character { get; set; }
public virtual Guid GuildId { get; set; }
[DeleteBehavior(DeleteBehavior.Restrict)]
[ForeignKey(nameof(GuildId))]
[Required]
public virtual Guild Guild { get; set; }
public GuildRank Rank { get; set; }
}