添加项目文件。
This commit is contained in:
@@ -0,0 +1,161 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using ContactService.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace ContactService.Infrastructure.Migrations
|
||||
{
|
||||
[DbContext(typeof(ContactDbContext))]
|
||||
[Migration("20260413114340_InitDb")]
|
||||
partial class InitDb
|
||||
{
|
||||
/// <inheritdoc />
|
||||
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("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
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user