//
using System;
using System.Collections.Generic;
using FileService.Infrastructure;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace FileService.Infrastructure.Migrations
{
[DbContext(typeof(FileDbContext))]
partial class FileDbContextModelSnapshot : 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("FileService.Domain.Entities.UploadFile", b =>
{
b.Property("ChatType")
.HasMaxLength(16)
.HasColumnType("varchar(16)");
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("ContentType")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("varchar(255)");
b.Property("CreationTime")
.HasColumnType("datetime(6)");
b.Property("Deletion")
.HasColumnType("datetime(6)");
b.Property("FileName")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("varchar(255)");
b.Property("FileSize")
.HasColumnType("bigint");
b.Property("IsDeleted")
.HasColumnType("tinyint(1)");
b.Property("IsPublic")
.HasColumnType("tinyint(1)");
b.Property("ModificationTime")
.HasColumnType("datetime(6)");
b.Property("OwnerId")
.HasColumnType("char(36)");
b.Property("SourceTaskId")
.HasColumnType("char(36)");
b.Property("State")
.HasColumnType("int");
b.Property("TargetId")
.HasColumnType("char(36)");
b.ComplexProperty>("CheckSum", "FileService.Domain.Entities.UploadFile.CheckSum#CheckSum", b1 =>
{
b1.IsRequired();
b1.Property("Algorithm")
.IsRequired()
.HasMaxLength(16)
.HasColumnType("varchar(16)")
.HasColumnName("checksum_algorithm");
b1.Property("Value")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("varchar(128)")
.HasColumnName("checksum_value");
});
b.ComplexProperty>("StorageLocation", "FileService.Domain.Entities.UploadFile.StorageLocation#StorageLocation", b1 =>
{
b1.IsRequired();
b1.Property("Bucket")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("varchar(255)")
.HasColumnName("storage_bucket");
b1.Property("ObjectKey")
.IsRequired()
.HasMaxLength(1024)
.HasColumnType("varchar(1024)")
.HasColumnName("storage_key");
b1.Property("Region")
.HasMaxLength(128)
.HasColumnType("varchar(128)")
.HasColumnName("storage_region");
b1.Property("StorageProvider")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("varchar(64)")
.HasColumnName("storage_provider");
});
b.HasKey("Id");
b.HasIndex("SourceTaskId")
.IsUnique();
b.ToTable("upload_files", (string)null);
});
modelBuilder.Entity("FileService.Domain.Entities.UploadTask", b =>
{
b.Property("ChatType")
.HasMaxLength(16)
.HasColumnType("varchar(16)");
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property("ContentType")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("varchar(255)");
b.Property("ConversationId")
.HasColumnType("char(36)");
b.Property("CreationTime")
.HasColumnType("datetime(6)");
b.Property("Deletion")
.HasColumnType("datetime(6)");
b.Property("FileName")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("varchar(255)");
b.Property("FileSize")
.HasColumnType("bigint");
b.Property("FailureReason")
.HasMaxLength(500)
.HasColumnType("varchar(500)");
b.Property("IsDeleted")
.HasColumnType("tinyint(1)");
b.Property("ModificationTime")
.HasColumnType("datetime(6)");
b.Property("ResultFileId")
.HasColumnType("char(36)");
b.Property("State")
.HasColumnType("int");
b.Property("TargetId")
.HasColumnType("char(36)");
b.Property("UploaderId")
.HasColumnType("char(36)");
b.ComplexProperty>("CheckSum", "FileService.Domain.Entities.UploadTask.CheckSum#CheckSum", b1 =>
{
b1.IsRequired();
b1.Property("Algorithm")
.IsRequired()
.HasMaxLength(16)
.HasColumnType("varchar(16)")
.HasColumnName("checksum_algorithm");
b1.Property("Value")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("varchar(128)")
.HasColumnName("checksum_value");
});
b.ComplexProperty>("StorageLocation", "FileService.Domain.Entities.UploadTask.StorageLocation#StorageLocation", b1 =>
{
b1.IsRequired();
b1.Property("Bucket")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("varchar(255)")
.HasColumnName("storage_bucket");
b1.Property("ObjectKey")
.IsRequired()
.HasMaxLength(1024)
.HasColumnType("varchar(1024)")
.HasColumnName("storage_key");
b1.Property("Region")
.HasMaxLength(128)
.HasColumnType("varchar(128)")
.HasColumnName("storage_region");
b1.Property("StorageProvider")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("varchar(64)")
.HasColumnName("storage_provider");
});
b.HasKey("Id");
b.ToTable("upload_tasks", (string)null);
});
#pragma warning restore 612, 618
}
}
}