18 lines
494 B
C#
18 lines
494 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace Authinator.Backend.Database.Tables;
|
|
|
|
public record Group {
|
|
public int Id { get; set; }
|
|
public string Name { get; set; } = null!;
|
|
|
|
public class Configuration : IEntityTypeConfiguration<Group> {
|
|
public void Configure(EntityTypeBuilder<Group> group) {
|
|
group.ToTable("Groups");
|
|
group.HasKey(p => p.Id);
|
|
group.Property(b => b.Name).HasColumnName("Name").IsRequired();
|
|
}
|
|
}
|
|
}
|