2024-02-07 15:40:36 +00:00
|
|
|
// Licensed to Timothy Schenk under the GNU AGPL Version 3 License.
|
2023-11-20 18:58:30 +00:00
|
|
|
|
2023-11-15 19:00:08 +00:00
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
2023-11-22 06:59:08 +00:00
|
|
|
using Microsoft.EntityFrameworkCore;
|
2023-11-15 19:00:08 +00:00
|
|
|
|
2024-01-29 07:39:18 +00:00
|
|
|
namespace Continuity.AuthServer.DB.Documents;
|
2023-11-14 19:07:45 +00:00
|
|
|
|
2023-11-22 06:59:08 +00:00
|
|
|
[Index(nameof(Name), IsUnique = true)]
|
|
|
|
[Index(nameof(Id), IsUnique = true)]
|
2025-01-16 13:30:40 +00:00
|
|
|
public class Guild {
|
2023-11-15 19:00:08 +00:00
|
|
|
[Key]
|
|
|
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
2023-11-14 19:07:45 +00:00
|
|
|
public Guid Id { get; set; }
|
2023-11-15 19:00:08 +00:00
|
|
|
|
2023-11-22 06:59:08 +00:00
|
|
|
[MaxLength(16)] public string Name { get; set; }
|
2023-11-14 19:07:45 +00:00
|
|
|
public string Notice { get; set; }
|
2023-11-22 06:59:08 +00:00
|
|
|
|
|
|
|
[DeleteBehavior(DeleteBehavior.Cascade)]
|
2023-11-15 19:00:08 +00:00
|
|
|
public virtual ICollection<GuildMember> GuildMembers { get; set; }
|
2023-11-14 19:07:45 +00:00
|
|
|
}
|