// using System; using System.Collections.Generic; using DysonNetwork.Drive; using DysonNetwork.Shared.Models; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using NodaTime; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace DysonNetwork.Drive.Migrations { [DbContext(typeof(AppDatabase))] partial class AppDatabaseModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "9.0.10") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("DysonNetwork.Drive.Billing.QuotaRecord", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("Description") .IsRequired() .HasColumnType("text") .HasColumnName("description"); b.Property("ExpiredAt") .HasColumnType("timestamp with time zone") .HasColumnName("expired_at"); b.Property("Name") .IsRequired() .HasColumnType("text") .HasColumnName("name"); b.Property("Quota") .HasColumnType("bigint") .HasColumnName("quota"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_quota_records"); b.ToTable("quota_records", (string)null); }); modelBuilder.Entity("DysonNetwork.Drive.Storage.Model.PersistentTask", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property("CompletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("completed_at"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("Description") .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("description"); b.Property("Discriminator") .IsRequired() .HasMaxLength(21) .HasColumnType("character varying(21)") .HasColumnName("discriminator"); b.Property("ErrorMessage") .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("error_message"); b.Property("EstimatedDurationSeconds") .HasColumnType("bigint") .HasColumnName("estimated_duration_seconds"); b.Property("ExpiredAt") .HasColumnType("timestamp with time zone") .HasColumnName("expired_at"); b.Property("LastActivity") .HasColumnType("timestamp with time zone") .HasColumnName("last_activity"); b.Property("Name") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("name"); b.Property>("Parameters") .IsRequired() .HasColumnType("jsonb") .HasColumnName("parameters"); b.Property("Priority") .HasColumnType("integer") .HasColumnName("priority"); b.Property("Progress") .HasColumnType("double precision") .HasColumnName("progress"); b.Property>("Results") .IsRequired() .HasColumnType("jsonb") .HasColumnName("results"); b.Property("StartedAt") .HasColumnType("timestamp with time zone") .HasColumnName("started_at"); b.Property("Status") .HasColumnType("integer") .HasColumnName("status"); b.Property("TaskId") .IsRequired() .HasMaxLength(64) .HasColumnType("character varying(64)") .HasColumnName("task_id"); b.Property("Type") .HasColumnType("integer") .HasColumnName("type"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_tasks"); b.ToTable("tasks", (string)null); b.HasDiscriminator().HasValue("PersistentTask"); b.UseTphMappingStrategy(); }); modelBuilder.Entity("DysonNetwork.Shared.Models.CloudFileReference", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("ExpiredAt") .HasColumnType("timestamp with time zone") .HasColumnName("expired_at"); b.Property("FileId") .IsRequired() .HasMaxLength(32) .HasColumnType("character varying(32)") .HasColumnName("file_id"); b.Property("ResourceId") .IsRequired() .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("resource_id"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("Usage") .IsRequired() .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("usage"); b.HasKey("Id") .HasName("pk_file_references"); b.HasIndex("FileId") .HasDatabaseName("ix_file_references_file_id"); b.ToTable("file_references", (string)null); }); modelBuilder.Entity("DysonNetwork.Shared.Models.FilePool", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property("BillingConfig") .IsRequired() .HasColumnType("jsonb") .HasColumnName("billing_config"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("Description") .IsRequired() .HasMaxLength(8192) .HasColumnType("character varying(8192)") .HasColumnName("description"); b.Property("IsHidden") .HasColumnType("boolean") .HasColumnName("is_hidden"); b.Property("Name") .IsRequired() .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("name"); b.Property("PolicyConfig") .IsRequired() .HasColumnType("jsonb") .HasColumnName("policy_config"); b.Property("StorageConfig") .IsRequired() .HasColumnType("jsonb") .HasColumnName("storage_config"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_pools"); b.ToTable("pools", (string)null); }); modelBuilder.Entity("DysonNetwork.Shared.Models.SnCloudFile", b => { b.Property("Id") .HasMaxLength(32) .HasColumnType("character varying(32)") .HasColumnName("id"); b.Property("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property("BundleId") .HasColumnType("uuid") .HasColumnName("bundle_id"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("Description") .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("description"); b.Property("ExpiredAt") .HasColumnType("timestamp with time zone") .HasColumnName("expired_at"); b.Property>("FileMeta") .HasColumnType("jsonb") .HasColumnName("file_meta"); b.Property("HasCompression") .HasColumnType("boolean") .HasColumnName("has_compression"); b.Property("HasThumbnail") .HasColumnType("boolean") .HasColumnName("has_thumbnail"); b.Property("Hash") .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("hash"); b.Property("IsEncrypted") .HasColumnType("boolean") .HasColumnName("is_encrypted"); b.Property("IsMarkedRecycle") .HasColumnType("boolean") .HasColumnName("is_marked_recycle"); b.Property("MimeType") .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("mime_type"); b.Property("Name") .IsRequired() .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("name"); b.Property("PoolId") .HasColumnType("uuid") .HasColumnName("pool_id"); b.Property>("SensitiveMarks") .HasColumnType("jsonb") .HasColumnName("sensitive_marks"); b.Property("Size") .HasColumnType("bigint") .HasColumnName("size"); b.Property("StorageId") .HasMaxLength(32) .HasColumnType("character varying(32)") .HasColumnName("storage_id"); b.Property("StorageUrl") .HasMaxLength(4096) .HasColumnType("character varying(4096)") .HasColumnName("storage_url"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.Property("UploadedAt") .HasColumnType("timestamp with time zone") .HasColumnName("uploaded_at"); b.Property>("UserMeta") .HasColumnType("jsonb") .HasColumnName("user_meta"); b.HasKey("Id") .HasName("pk_files"); b.HasIndex("BundleId") .HasDatabaseName("ix_files_bundle_id"); b.HasIndex("PoolId") .HasDatabaseName("ix_files_pool_id"); b.ToTable("files", (string)null); }); modelBuilder.Entity("DysonNetwork.Shared.Models.SnFileBundle", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid") .HasColumnName("id"); b.Property("AccountId") .HasColumnType("uuid") .HasColumnName("account_id"); b.Property("CreatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("created_at"); b.Property("DeletedAt") .HasColumnType("timestamp with time zone") .HasColumnName("deleted_at"); b.Property("Description") .HasMaxLength(8192) .HasColumnType("character varying(8192)") .HasColumnName("description"); b.Property("ExpiredAt") .HasColumnType("timestamp with time zone") .HasColumnName("expired_at"); b.Property("Name") .IsRequired() .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("name"); b.Property("Passcode") .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("passcode"); b.Property("Slug") .IsRequired() .HasMaxLength(1024) .HasColumnType("character varying(1024)") .HasColumnName("slug"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone") .HasColumnName("updated_at"); b.HasKey("Id") .HasName("pk_bundles"); b.HasIndex("Slug") .IsUnique() .HasDatabaseName("ix_bundles_slug"); b.ToTable("bundles", (string)null); }); modelBuilder.Entity("DysonNetwork.Drive.Storage.Model.PersistentUploadTask", b => { b.HasBaseType("DysonNetwork.Drive.Storage.Model.PersistentTask"); b.Property("BundleId") .HasColumnType("uuid") .HasColumnName("bundle_id"); b.Property("ChunkSize") .HasColumnType("bigint") .HasColumnName("chunk_size"); b.Property("ChunksCount") .HasColumnType("integer") .HasColumnName("chunks_count"); b.Property("ChunksUploaded") .HasColumnType("integer") .HasColumnName("chunks_uploaded"); b.Property("ContentType") .IsRequired() .HasMaxLength(128) .HasColumnType("character varying(128)") .HasColumnName("content_type"); b.Property("EncryptPassword") .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("encrypt_password"); b.Property("FileName") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)") .HasColumnName("file_name"); b.Property("FileSize") .HasColumnType("bigint") .HasColumnName("file_size"); b.Property("Hash") .IsRequired() .HasColumnType("text") .HasColumnName("hash"); b.Property("PoolId") .HasColumnType("uuid") .HasColumnName("pool_id"); b.PrimitiveCollection>("UploadedChunks") .IsRequired() .HasColumnType("integer[]") .HasColumnName("uploaded_chunks"); b.HasDiscriminator().HasValue("PersistentUploadTask"); }); modelBuilder.Entity("DysonNetwork.Shared.Models.CloudFileReference", b => { b.HasOne("DysonNetwork.Shared.Models.SnCloudFile", "File") .WithMany("References") .HasForeignKey("FileId") .OnDelete(DeleteBehavior.Cascade) .IsRequired() .HasConstraintName("fk_file_references_files_file_id"); b.Navigation("File"); }); modelBuilder.Entity("DysonNetwork.Shared.Models.SnCloudFile", b => { b.HasOne("DysonNetwork.Shared.Models.SnFileBundle", "Bundle") .WithMany("Files") .HasForeignKey("BundleId") .HasConstraintName("fk_files_bundles_bundle_id"); b.HasOne("DysonNetwork.Shared.Models.FilePool", "Pool") .WithMany() .HasForeignKey("PoolId") .HasConstraintName("fk_files_pools_pool_id"); b.Navigation("Bundle"); b.Navigation("Pool"); }); modelBuilder.Entity("DysonNetwork.Shared.Models.SnCloudFile", b => { b.Navigation("References"); }); modelBuilder.Entity("DysonNetwork.Shared.Models.SnFileBundle", b => { b.Navigation("Files"); }); #pragma warning restore 612, 618 } } }