Files
IM_NEW/ContactService.Infrastructure/Migrations/ContactDbContextModelSnapshot.cs
T
2026-04-30 21:08:28 +08:00

159 lines
5.6 KiB
C#

// <auto-generated />
using System;
using ContactService.Infrastructure;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace ContactService.Infrastructure.Migrations
{
[DbContext(typeof(ContactDbContext))]
partial class ContactDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "9.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 64);
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
modelBuilder.Entity("ContactService.Domain.Entities.Friend", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property<DateTimeOffset>("CreationTime")
.HasColumnType("datetime(6)");
b.Property<DateTimeOffset?>("Deletion")
.HasColumnType("datetime(6)");
b.Property<bool>("IsDeleted")
.HasColumnType("tinyint(1)");
b.Property<DateTimeOffset?>("ModificationTime")
.HasColumnType("datetime(6)");
b.Property<string>("RemarkName")
.HasColumnType("longtext");
b.Property<int>("Status")
.HasColumnType("int");
b.HasKey("Id");
b.ToTable("friends", (string)null);
});
modelBuilder.Entity("ContactService.Domain.Entities.FriendRequest", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property<DateTimeOffset>("CreationTime")
.HasColumnType("datetime(6)");
b.Property<DateTimeOffset?>("Deletion")
.HasColumnType("datetime(6)");
b.Property<string>("Description")
.IsRequired()
.HasColumnType("longtext");
b.Property<bool>("IsDeleted")
.HasColumnType("tinyint(1)");
b.Property<DateTimeOffset?>("ModificationTime")
.HasColumnType("datetime(6)");
b.Property<Guid>("OwnerId")
.HasColumnType("char(36)");
b.Property<string>("RemarkName")
.HasColumnType("longtext");
b.Property<int>("State")
.HasColumnType("int");
b.Property<Guid>("TargetId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("OwnerId", "TargetId");
b.ToTable("friend_requests", (string)null);
});
modelBuilder.Entity("ContactService.Domain.Entities.Friend", b =>
{
b.OwnsOne("ContactService.Domain.ValueObjects.UserProfile", "Owner", b1 =>
{
b1.Property<Guid>("FriendId")
.HasColumnType("char(36)");
b1.Property<string>("Avatar")
.HasColumnType("longtext")
.HasColumnName("OwnerAvatarUrl");
b1.Property<Guid>("Id")
.HasColumnType("char(36)")
.HasColumnName("OwnerId");
b1.Property<string>("NickName")
.IsRequired()
.HasColumnType("longtext")
.HasColumnName("OwnerNickName");
b1.HasKey("FriendId");
b1.ToTable("friends");
b1.WithOwner()
.HasForeignKey("FriendId");
});
b.OwnsOne("ContactService.Domain.ValueObjects.UserProfile", "Target", b1 =>
{
b1.Property<Guid>("FriendId")
.HasColumnType("char(36)");
b1.Property<string>("Avatar")
.HasColumnType("longtext")
.HasColumnName("TargetAvatarUrl");
b1.Property<Guid>("Id")
.HasColumnType("char(36)")
.HasColumnName("TargetId");
b1.Property<string>("NickName")
.IsRequired()
.HasColumnType("longtext")
.HasColumnName("TargetNickName");
b1.HasKey("FriendId");
b1.ToTable("friends");
b1.WithOwner()
.HasForeignKey("FriendId");
});
b.Navigation("Owner")
.IsRequired();
b.Navigation("Target")
.IsRequired();
});
#pragma warning restore 612, 618
}
}
}