mirror of
https://github.com/Govor-team/Govor.git
synced 2026-11-16 20:56:03 +00:00
2e9d7e625e
Adds server-side group and channel management, private invitations, member moderation, avatar handling, and required-channel configuration. This change also introduces SignalR group profile/member notifications, updates registration to atomically join required channels, and adds EF migration and test coverage for group membership, permissions, and invitation expiry rules.
28 lines
905 B
C#
28 lines
905 B
C#
using Govor.Domain.Models;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
|
|
namespace Govor.Domain.Configurations;
|
|
|
|
public class GroupInvitationConfiguration : IEntityTypeConfiguration<GroupInvitation>
|
|
{
|
|
public void Configure(EntityTypeBuilder<GroupInvitation> builder)
|
|
{
|
|
builder.HasKey(e => e.Id);
|
|
|
|
builder.Property(e => e.InvitationCode).IsRequired().HasMaxLength(200);
|
|
builder.HasIndex(e => e.InvitationCode).IsUnique();
|
|
builder.Property(e => e.Description).HasMaxLength(500);
|
|
builder.Property(e => e.EndDate).IsRequired();
|
|
builder.Property(e => e.CreatedAt).IsRequired();
|
|
|
|
builder.HasOne(e => e.UserMaker)
|
|
.WithMany()
|
|
.HasForeignKey(e => e.UserMakerId)
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
|
|
|
|
builder.Ignore(e => e.GroupMemberships);
|
|
}
|
|
}
|