//
using System;
using GroupService.Infrastructure;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace GroupService.Infrastructure.Migrations
{
[DbContext(typeof(GroupDbContext))]
[Migration("20260419115121_InitGroupDb")]
partial class InitGroupDb
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "9.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
modelBuilder.Entity("GroupService.Domain.Entities.Group", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("AllMembersBanned")
.HasColumnType("tinyint(1)");
b.Property("Announcement")
.IsRequired()
.HasColumnType("longtext");
b.Property("Authority")
.HasColumnType("int");
b.Property("Avatar")
.HasColumnType("longtext");
b.Property("CreationTime")
.HasColumnType("datetime(6)");
b.Property("Deletion")
.HasColumnType("datetime(6)");
b.Property("GroupMaster")
.HasColumnType("char(36)");
b.Property("IsDeleted")
.HasColumnType("tinyint(1)");
b.Property("LastMessage")
.IsRequired()
.HasColumnType("longtext");
b.Property("LastSenderName")
.IsRequired()
.HasColumnType("longtext");
b.Property("MaxSequenceId")
.HasColumnType("bigint");
b.Property("ModificationTime")
.HasColumnType("datetime(6)");
b.Property("Name")
.IsRequired()
.HasColumnType("longtext");
b.Property("Status")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("groups", (string)null);
});
modelBuilder.Entity("GroupService.Domain.Entities.GroupMember", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("Avatar")
.HasColumnType("longtext");
b.Property("CreationTime")
.HasColumnType("datetime(6)");
b.Property("Deletion")
.HasColumnType("datetime(6)");
b.Property("GroupId")
.HasColumnType("char(36)");
b.Property("GroupNickName")
.IsRequired()
.HasColumnType("longtext");
b.Property("IsDeleted")
.HasColumnType("tinyint(1)");
b.Property("ModificationTime")
.HasColumnType("datetime(6)");
b.Property("Role")
.HasColumnType("int");
b.Property("UserId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.ToTable("group_members", (string)null);
});
#pragma warning restore 612, 618
}
}
}