diff --git a/src/AStar.Dev.Infrastructure.FilesDb/AStar.Dev.Infrastructure.FilesDb.csproj b/src/AStar.Dev.Infrastructure.FilesDb/AStar.Dev.Infrastructure.FilesDb.csproj
index f549fb5..5afbe8c 100644
--- a/src/AStar.Dev.Infrastructure.FilesDb/AStar.Dev.Infrastructure.FilesDb.csproj
+++ b/src/AStar.Dev.Infrastructure.FilesDb/AStar.Dev.Infrastructure.FilesDb.csproj
@@ -30,8 +30,8 @@
https://github.com/astar-development/astar-dev-infrastructure-filesdb.git
snupkg
AStar Dev Infrastructure FilesDb
- Rework the File Classifications area and update for AStar Functional Results.
- 0.2.0
+ Rework the Image Details and Add File Created date.
+ 0.2.1
@@ -61,6 +61,10 @@
+
+
+
+
True
1701;1702;
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/AStar.Dev.Infrastructure.FilesDb.xml b/src/AStar.Dev.Infrastructure.FilesDb/AStar.Dev.Infrastructure.FilesDb.xml
index 976b03d..d6b6a65 100644
--- a/src/AStar.Dev.Infrastructure.FilesDb/AStar.Dev.Infrastructure.FilesDb.xml
+++ b/src/AStar.Dev.Infrastructure.FilesDb/AStar.Dev.Infrastructure.FilesDb.xml
@@ -4,11 +4,19 @@
AStar.Dev.Infrastructure.FilesDb
-
+
+
+
+
+
+
+
+
+
-
+
@@ -16,100 +24,64 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
+
@@ -245,6 +217,9 @@
Gets or sets the DuplicatesDetails loaded from the configured view in the database
+
+
+
The overridden OnModelCreating method
@@ -287,88 +262,16 @@
The original list of files for further filtering.
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -755,6 +658,11 @@
Gets or sets the file size. I know, shocking...
+
+
+ Gets or sets the file Creation Date. I know, shocking...
+
+
Gets or sets whether the file is of a supported image type
@@ -939,15 +847,7 @@
-
-
-
-
-
-
-
-
-
+
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/Configurations/DeletionStatusConfiguration.cs b/src/AStar.Dev.Infrastructure.FilesDb/Configurations/DeletionStatusConfiguration.cs
deleted file mode 100644
index 22f1de4..0000000
--- a/src/AStar.Dev.Infrastructure.FilesDb/Configurations/DeletionStatusConfiguration.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using AStar.Dev.Infrastructure.FilesDb.Models;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Metadata.Builders;
-
-namespace AStar.Dev.Infrastructure.FilesDb.Configurations;
-
-internal sealed class DeletionStatusConfiguration : IEntityTypeConfiguration
-{
- public void Configure(EntityTypeBuilder builder)
- {
- _ = builder
- .ToTable(nameof(DeletionStatus), Constants.SchemaName)
- .HasKey(deletionStatus => deletionStatus.Id);
-
- _ = builder
- .Property(deletionStatus => deletionStatus.HardDeletePending)
- .HasColumnName("HardDeletePending")
- .HasColumnType("datetimeoffset");
-
- _ = builder
- .Property(deletionStatus => deletionStatus.SoftDeletePending)
- .HasColumnName("SoftDeletePending")
- .HasColumnType("datetimeoffset");
-
- _ = builder
- .Property(deletionStatus => deletionStatus.SoftDeleted)
- .HasColumnName("SoftDeleted")
- .HasColumnType("datetimeoffset");
- }
-}
\ No newline at end of file
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/Configurations/DirectoryNameConfiguration.cs b/src/AStar.Dev.Infrastructure.FilesDb/Configurations/DirectoryNameConfiguration.cs
deleted file mode 100644
index 18c6f0f..0000000
--- a/src/AStar.Dev.Infrastructure.FilesDb/Configurations/DirectoryNameConfiguration.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using AStar.Dev.Infrastructure.FilesDb.Models;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Metadata.Builders;
-
-namespace AStar.Dev.Infrastructure.FilesDb.Configurations;
-
-internal sealed class DirectoryNameConfiguration : IComplexPropertyConfiguration
-{
- public void Configure(ComplexPropertyBuilder builder)
- => builder.Property(directoryName => directoryName.Value)
- .HasColumnName("DirectoryName")
- .HasColumnType("nvarchar(256)");
-}
\ No newline at end of file
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/Configurations/EventConfiguration.cs b/src/AStar.Dev.Infrastructure.FilesDb/Configurations/EventConfiguration.cs
deleted file mode 100644
index b2f2ac8..0000000
--- a/src/AStar.Dev.Infrastructure.FilesDb/Configurations/EventConfiguration.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using AStar.Dev.Infrastructure.FilesDb.Models;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Metadata.Builders;
-
-namespace AStar.Dev.Infrastructure.FilesDb.Configurations;
-
-///
-///
-public class EventConfiguration : IEntityTypeConfiguration
-{
- ///
- public void Configure(EntityTypeBuilder builder)
- {
- _ = builder
- .ToTable(nameof(Event), Constants.SchemaName)
- .HasKey(fileDetail => fileDetail.Id);
-
- _ = builder.Property(fileDetail => fileDetail.FileName).HasMaxLength(256);
- _ = builder.Property(fileDetail => fileDetail.DirectoryName).HasMaxLength(256);
- _ = builder.Property(fileDetail => fileDetail.Handle).HasMaxLength(256);
- _ = builder.Property(fileDetail => fileDetail.UpdatedBy).HasMaxLength(30);
-
- _ = builder.ComplexProperty(fileDetail => fileDetail.Type).Configure(new EventTypeConfiguration());
- }
-}
\ No newline at end of file
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/Configurations/EventTypeConfiguration.cs b/src/AStar.Dev.Infrastructure.FilesDb/Configurations/EventTypeConfiguration.cs
deleted file mode 100644
index 2fbf538..0000000
--- a/src/AStar.Dev.Infrastructure.FilesDb/Configurations/EventTypeConfiguration.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using AStar.Dev.Infrastructure.FilesDb.Models;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Metadata.Builders;
-
-namespace AStar.Dev.Infrastructure.FilesDb.Configurations;
-
-internal sealed class EventTypeConfiguration : IComplexPropertyConfiguration
-{
- public void Configure(ComplexPropertyBuilder builder)
- {
- _ = builder.Property(eventType => eventType.Value).HasColumnName("EventType").IsRequired();
- _ = builder.Property(eventType => eventType.Name).HasColumnName("EventName").IsRequired();
- }
-}
\ No newline at end of file
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/Configurations/FileClassificationConfiguration.cs b/src/AStar.Dev.Infrastructure.FilesDb/Configurations/FileClassificationConfiguration.cs
deleted file mode 100644
index 4ae2bab..0000000
--- a/src/AStar.Dev.Infrastructure.FilesDb/Configurations/FileClassificationConfiguration.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using AStar.Dev.Infrastructure.FilesDb.Models;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Metadata.Builders;
-
-namespace AStar.Dev.Infrastructure.FilesDb.Configurations;
-
-///
-///
-public class FileClassificationConfiguration : IEntityTypeConfiguration
-{
- ///
- public void Configure(EntityTypeBuilder builder)
- {
- _ = builder
- .ToTable(nameof(FileClassification), Constants.SchemaName)
- .HasKey(fileClassification => fileClassification.Id);
-
- _ = builder.HasIndex(fileClassification => fileClassification.Name).IsUnique();
-
- //_ = builder.HasMany();
- _ = builder.Property(fileClassification => fileClassification.Name).HasMaxLength(150);
- }
-}
\ No newline at end of file
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/Configurations/FileDetailConfiguration.cs b/src/AStar.Dev.Infrastructure.FilesDb/Configurations/FileDetailConfiguration.cs
deleted file mode 100644
index 38d5856..0000000
--- a/src/AStar.Dev.Infrastructure.FilesDb/Configurations/FileDetailConfiguration.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-using AStar.Dev.Infrastructure.FilesDb.Models;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Metadata.Builders;
-
-namespace AStar.Dev.Infrastructure.FilesDb.Configurations;
-
-///
-///
-public class FileDetailConfiguration : IEntityTypeConfiguration
-{
- ///
- public void Configure(EntityTypeBuilder builder)
- {
- _ = builder.ToTable("FileDetail");
-
- _ = builder.HasKey(file => file.Id);
-
- _ = builder.Property(file => file.Id)
- .HasConversion(fileId => fileId.Value, fileId => new(fileId));
-
- _ = builder.Ignore(fileDetail => fileDetail.FileName);
- _ = builder.Ignore(fileDetail => fileDetail.DirectoryName);
- _ = builder.Ignore(fileDetail => fileDetail.FullNameWithPath);
-
- _ = builder.Property(file => file.FileHandle)
- .HasColumnType("nvarchar(256)")
- .HasConversion(fileHandle => fileHandle.Value, fileHandle => new(fileHandle));
-
- _ = builder.ComplexProperty(fileDetail => fileDetail.DirectoryName)
- .Configure(new DirectoryNameConfiguration());
-
- _ = builder.ComplexProperty(fileDetail => fileDetail.FileName)
- .Configure(new FileNameConfiguration());
-
- _ = builder.HasIndex(fileDetail => fileDetail.FileHandle).IsUnique();
- _ = builder.HasIndex(fileDetail => fileDetail.FileSize);
-
- // Composite index to optimize duplicate images search (partial optimization)
- // Note: ImageHeight and ImageWidth can't be indexed directly as they're complex properties
- _ = builder.HasIndex(fileDetail => new { fileDetail.IsImage, fileDetail.FileSize })
- .HasDatabaseName("IX_FileDetail_DuplicateImages");
- }
-}
\ No newline at end of file
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/Configurations/FileNameConfiguration.cs b/src/AStar.Dev.Infrastructure.FilesDb/Configurations/FileNameConfiguration.cs
deleted file mode 100644
index e93dfe8..0000000
--- a/src/AStar.Dev.Infrastructure.FilesDb/Configurations/FileNameConfiguration.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using AStar.Dev.Infrastructure.FilesDb.Models;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Metadata.Builders;
-
-namespace AStar.Dev.Infrastructure.FilesDb.Configurations;
-
-internal sealed class FileNameConfiguration : IComplexPropertyConfiguration
-{
- public void Configure(ComplexPropertyBuilder builder)
- => builder.Property(fileName => fileName.Value)
- .HasColumnName("FileName")
- .HasColumnType("nvarchar(256)");
-}
\ No newline at end of file
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/Configurations/FileNamePartConfiguration.cs b/src/AStar.Dev.Infrastructure.FilesDb/Configurations/FileNamePartConfiguration.cs
deleted file mode 100644
index 2b5a981..0000000
--- a/src/AStar.Dev.Infrastructure.FilesDb/Configurations/FileNamePartConfiguration.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using AStar.Dev.Infrastructure.FilesDb.Models;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Metadata.Builders;
-
-namespace AStar.Dev.Infrastructure.FilesDb.Configurations;
-
-///
-///
-public class FileNamePartConfiguration : IEntityTypeConfiguration
-{
- ///
- public void Configure(EntityTypeBuilder builder)
- {
- _ = builder
- .ToTable(nameof(FileNamePart), Constants.SchemaName)
- .HasKey(fileNamePart => fileNamePart.Id);
-
- _ = builder.Property(fileNamePart => fileNamePart.Text).HasMaxLength(150);
- }
-}
\ No newline at end of file
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/Configurations/ImageDetailConfiguration.cs b/src/AStar.Dev.Infrastructure.FilesDb/Configurations/ImageDetailConfiguration.cs
deleted file mode 100644
index 98fc49c..0000000
--- a/src/AStar.Dev.Infrastructure.FilesDb/Configurations/ImageDetailConfiguration.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using AStar.Dev.Infrastructure.FilesDb.Models;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Metadata.Builders;
-
-namespace AStar.Dev.Infrastructure.FilesDb.Configurations;
-
-internal sealed class ImageDetailConfiguration : IEntityTypeConfiguration
-{
- public void Configure(EntityTypeBuilder builder)
- {
- _ = builder
- .ToTable(nameof(ImageDetail), Constants.SchemaName)
- .HasKey(imageDetail => imageDetail.Id);
-
- _ = builder.Property(image => image.Width).HasColumnName("ImageWidth");
- _ = builder.Property(image => image.Height).HasColumnName("ImageHeight");
- }
-}
\ No newline at end of file
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/Configurations/ComplexPropertyBuilderConfiguration.cs b/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/ComplexPropertyBuilderConfiguration.cs
similarity index 90%
rename from src/AStar.Dev.Infrastructure.FilesDb/Configurations/ComplexPropertyBuilderConfiguration.cs
rename to src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/ComplexPropertyBuilderConfiguration.cs
index 2453720..47678d6 100644
--- a/src/AStar.Dev.Infrastructure.FilesDb/Configurations/ComplexPropertyBuilderConfiguration.cs
+++ b/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/ComplexPropertyBuilderConfiguration.cs
@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore.Metadata.Builders;
-namespace AStar.Dev.Infrastructure.FilesDb.Configurations;
+namespace AStar.Dev.Infrastructure.FilesDb.Data.Configurations;
///
///
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/DeletionStatusConfiguration.cs b/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/DeletionStatusConfiguration.cs
index 6c0fe09..bbae765 100644
--- a/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/DeletionStatusConfiguration.cs
+++ b/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/DeletionStatusConfiguration.cs
@@ -1,14 +1,17 @@
-using AStar.Dev.Infrastructure.Data.Configurations;
-using AStar.Dev.Infrastructure.FilesDb.Models;
+using AStar.Dev.Infrastructure.FilesDb.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
namespace AStar.Dev.Infrastructure.FilesDb.Data.Configurations;
-internal sealed class DeletionStatusConfiguration : IComplexPropertyConfiguration
+internal sealed class DeletionStatusConfiguration : IEntityTypeConfiguration
{
- public void Configure(ComplexPropertyBuilder builder)
+ public void Configure(EntityTypeBuilder builder)
{
+ _ = builder
+ .ToTable(nameof(DeletionStatus), Constants.SchemaName)
+ .HasKey(deletionStatus => deletionStatus.Id);
+
_ = builder
.Property(deletionStatus => deletionStatus.HardDeletePending)
.HasColumnName("HardDeletePending")
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/DirectoryNameConfiguration.cs b/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/DirectoryNameConfiguration.cs
index 8e7d470..32548e8 100644
--- a/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/DirectoryNameConfiguration.cs
+++ b/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/DirectoryNameConfiguration.cs
@@ -1,5 +1,4 @@
-using AStar.Dev.Infrastructure.Data.Configurations;
-using AStar.Dev.Infrastructure.FilesDb.Models;
+using AStar.Dev.Infrastructure.FilesDb.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/EventConfiguration.cs b/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/EventConfiguration.cs
index d5f8839..1f05f60 100644
--- a/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/EventConfiguration.cs
+++ b/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/EventConfiguration.cs
@@ -1,5 +1,4 @@
-using AStar.Dev.Infrastructure.Data.Configurations;
-using AStar.Dev.Infrastructure.FilesDb.Models;
+using AStar.Dev.Infrastructure.FilesDb.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/EventTypeConfiguration.cs b/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/EventTypeConfiguration.cs
index 5f7defd..639eac8 100644
--- a/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/EventTypeConfiguration.cs
+++ b/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/EventTypeConfiguration.cs
@@ -1,4 +1,3 @@
-using AStar.Dev.Infrastructure.Data.Configurations;
using AStar.Dev.Infrastructure.FilesDb.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/Configurations/FileAccessDetailConfiguration.cs b/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/FileAccessDetailConfiguration.cs
similarity index 89%
rename from src/AStar.Dev.Infrastructure.FilesDb/Configurations/FileAccessDetailConfiguration.cs
rename to src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/FileAccessDetailConfiguration.cs
index 22ac621..b397bb7 100644
--- a/src/AStar.Dev.Infrastructure.FilesDb/Configurations/FileAccessDetailConfiguration.cs
+++ b/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/FileAccessDetailConfiguration.cs
@@ -2,7 +2,7 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
-namespace AStar.Dev.Infrastructure.FilesDb.Configurations;
+namespace AStar.Dev.Infrastructure.FilesDb.Data.Configurations;
///
///
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/FileClassificationConfiguration.cs b/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/FileClassificationConfiguration.cs
index 7cc7943..de86773 100644
--- a/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/FileClassificationConfiguration.cs
+++ b/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/FileClassificationConfiguration.cs
@@ -15,7 +15,9 @@ public void Configure(EntityTypeBuilder builder)
.ToTable(nameof(FileClassification), Constants.SchemaName)
.HasKey(fileClassification => fileClassification.Id);
- _ = builder.HasMany();
+ _ = builder.HasIndex(fileClassification => fileClassification.Name).IsUnique();
+
+ //_ = builder.HasMany();
_ = builder.Property(fileClassification => fileClassification.Name).HasMaxLength(150);
}
}
\ No newline at end of file
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/FileDetailConfiguration.cs b/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/FileDetailConfiguration.cs
index 8817e16..786c100 100644
--- a/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/FileDetailConfiguration.cs
+++ b/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/FileDetailConfiguration.cs
@@ -1,4 +1,3 @@
-using AStar.Dev.Infrastructure.Data.Configurations;
using AStar.Dev.Infrastructure.FilesDb.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
@@ -22,22 +21,20 @@ public void Configure(EntityTypeBuilder builder)
_ = builder.Ignore(fileDetail => fileDetail.FileName);
_ = builder.Ignore(fileDetail => fileDetail.DirectoryName);
_ = builder.Ignore(fileDetail => fileDetail.FullNameWithPath);
+ _ = builder.Ignore(fileDetail => fileDetail.ImageDetail);
_ = builder.Property(file => file.FileHandle)
.HasColumnType("nvarchar(256)")
.HasConversion(fileHandle => fileHandle.Value, fileHandle => new(fileHandle));
- _ = builder.ComplexProperty(fileDetail => fileDetail.ImageDetail)
- .Configure(new ImageDetailConfiguration());
-
_ = builder.ComplexProperty(fileDetail => fileDetail.DirectoryName)
.Configure(new DirectoryNameConfiguration());
_ = builder.ComplexProperty(fileDetail => fileDetail.FileName)
.Configure(new FileNameConfiguration());
- _ = builder.ComplexProperty(fileDetail => fileDetail.DeletionStatus)
- .Configure(new DeletionStatusConfiguration());
+ _ = builder.ComplexProperty(fileDetail => fileDetail.ImageDetail)
+ .Configure(new ImageDetailConfiguration());
_ = builder.HasIndex(fileDetail => fileDetail.FileHandle).IsUnique();
_ = builder.HasIndex(fileDetail => fileDetail.FileSize);
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/FileNameConfiguration.cs b/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/FileNameConfiguration.cs
index a8afc7e..20cd330 100644
--- a/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/FileNameConfiguration.cs
+++ b/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/FileNameConfiguration.cs
@@ -1,4 +1,3 @@
-using AStar.Dev.Infrastructure.Data.Configurations;
using AStar.Dev.Infrastructure.FilesDb.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/Configurations/IComplexPropertyConfiguration.cs b/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/IComplexPropertyConfiguration.cs
similarity index 84%
rename from src/AStar.Dev.Infrastructure.FilesDb/Configurations/IComplexPropertyConfiguration.cs
rename to src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/IComplexPropertyConfiguration.cs
index 84833f6..92bfb50 100644
--- a/src/AStar.Dev.Infrastructure.FilesDb/Configurations/IComplexPropertyConfiguration.cs
+++ b/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/IComplexPropertyConfiguration.cs
@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore.Metadata.Builders;
-namespace AStar.Dev.Infrastructure.FilesDb.Configurations;
+namespace AStar.Dev.Infrastructure.FilesDb.Data.Configurations;
///
///
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/Configurations/ModelToIgnoreConfiguration.cs b/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/ModelToIgnoreConfiguration.cs
similarity index 90%
rename from src/AStar.Dev.Infrastructure.FilesDb/Configurations/ModelToIgnoreConfiguration.cs
rename to src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/ModelToIgnoreConfiguration.cs
index 0fe0248..8a86edb 100644
--- a/src/AStar.Dev.Infrastructure.FilesDb/Configurations/ModelToIgnoreConfiguration.cs
+++ b/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/ModelToIgnoreConfiguration.cs
@@ -2,7 +2,7 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
-namespace AStar.Dev.Infrastructure.FilesDb.Configurations;
+namespace AStar.Dev.Infrastructure.FilesDb.Data.Configurations;
///
///
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/Configurations/TagToIgnoreConfiguration.cs b/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/TagToIgnoreConfiguration.cs
similarity index 89%
rename from src/AStar.Dev.Infrastructure.FilesDb/Configurations/TagToIgnoreConfiguration.cs
rename to src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/TagToIgnoreConfiguration.cs
index 5e25176..7cbc5c3 100644
--- a/src/AStar.Dev.Infrastructure.FilesDb/Configurations/TagToIgnoreConfiguration.cs
+++ b/src/AStar.Dev.Infrastructure.FilesDb/Data/Configurations/TagToIgnoreConfiguration.cs
@@ -2,7 +2,7 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
-namespace AStar.Dev.Infrastructure.FilesDb.Configurations;
+namespace AStar.Dev.Infrastructure.FilesDb.Data.Configurations;
///
///
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/Migrations/20250715194331_InitialCreation.Designer.cs b/src/AStar.Dev.Infrastructure.FilesDb/Migrations/20250715194331_InitialCreation.Designer.cs
deleted file mode 100644
index e69de29..0000000
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/Migrations/20250715194331_InitialCreation.cs b/src/AStar.Dev.Infrastructure.FilesDb/Migrations/20250715194331_InitialCreation.cs
deleted file mode 100644
index e69de29..0000000
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/Migrations/20250725184934_RecreateAgain.Designer.cs b/src/AStar.Dev.Infrastructure.FilesDb/Migrations/20250725184934_RecreateAgain.Designer.cs
deleted file mode 100644
index 1d12a66..0000000
--- a/src/AStar.Dev.Infrastructure.FilesDb/Migrations/20250725184934_RecreateAgain.Designer.cs
+++ /dev/null
@@ -1,343 +0,0 @@
-//
-
-using System.Collections.Generic;
-using AStar.Dev.Infrastructure.FilesDb.Data;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
-#nullable disable
-
-namespace AStar.Dev.Infrastructure.FilesDb.Migrations
-{
- [DbContext(typeof(FilesContext))]
- [Migration("20250725184934_RecreateAgain")]
- partial class RecreateAgain
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasDefaultSchema("files")
- .UseCollation("SQL_Latin1_General_CP1_CI_AS")
- .HasAnnotation("ProductVersion", "9.0.7")
- .HasAnnotation("Relational:MaxIdentifierLength", 128);
-
- SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
-
- modelBuilder.Entity("AStar.Dev.Infrastructure.FilesDb.Models.DuplicateDetail", b =>
- {
- b.Property("DirectoryName")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("FileHandle")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("FileLastViewed")
- .HasColumnType("datetimeoffset");
-
- b.Property("FileName")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("FileSize")
- .HasColumnType("bigint");
-
- b.Property("HardDeletePending")
- .HasColumnType("datetimeoffset");
-
- b.Property("ImageHeight")
- .HasColumnType("int");
-
- b.Property("ImageWidth")
- .HasColumnType("int");
-
- b.Property("Instances")
- .HasColumnType("int");
-
- b.Property("IsImage")
- .HasColumnType("bit");
-
- b.Property("MoveRequired")
- .HasColumnType("bit");
-
- b.Property("SoftDeletePending")
- .HasColumnType("datetimeoffset");
-
- b.Property("SoftDeleted")
- .HasColumnType("datetimeoffset");
-
- b.Property("UpdatedOn")
- .HasColumnType("datetimeoffset");
-
- b.ToTable((string)null);
-
- b.ToView("vw_DuplicateDetails", "files");
- });
-
- modelBuilder.Entity("AStar.Dev.Infrastructure.FilesDb.Models.Event", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("DirectoryName")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("EventOccurredAt")
- .HasColumnType("datetimeoffset");
-
- b.Property("FileCreated")
- .HasColumnType("datetimeoffset");
-
- b.Property("FileLastModified")
- .HasColumnType("datetimeoffset");
-
- b.Property("FileName")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("FileSize")
- .HasColumnType("bigint");
-
- b.Property("Handle")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("Height")
- .HasColumnType("int");
-
- b.Property("UpdatedBy")
- .IsRequired()
- .HasMaxLength(30)
- .HasColumnType("nvarchar(30)");
-
- b.Property("Width")
- .HasColumnType("int");
-
- b.ComplexProperty>("Type", "AStar.Dev.Infrastructure.FilesDb.Models.Event.Type#EventType", b1 =>
- {
- b1.IsRequired();
-
- b1.Property("Name")
- .IsRequired()
- .HasColumnType("nvarchar(max)")
- .HasColumnName("EventName");
-
- b1.Property("Value")
- .HasColumnType("int")
- .HasColumnName("EventType");
- });
-
- b.HasKey("Id");
-
- b.ToTable("Event", "files");
- });
-
- modelBuilder.Entity("AStar.Dev.Infrastructure.FilesDb.Models.FileClassification", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("Celebrity")
- .HasColumnType("bit");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(150)
- .HasColumnType("nvarchar(150)");
-
- b.HasKey("Id");
-
- b.ToTable("FileClassification", "files");
- });
-
- modelBuilder.Entity("AStar.Dev.Infrastructure.FilesDb.Models.FileDetail", b =>
- {
- b.Property("Id")
- .HasColumnType("int");
-
- b.Property("FileCreated")
- .HasColumnType("datetimeoffset");
-
- b.Property("FileHandle")
- .IsRequired()
- .HasColumnType("nvarchar(256)");
-
- b.Property("FileLastModified")
- .HasColumnType("datetimeoffset");
-
- b.Property("FileLastViewed")
- .HasColumnType("datetimeoffset");
-
- b.Property("FileName")
- .IsRequired()
- .HasColumnType("nvarchar(256)");
-
- b.Property("FileSize")
- .HasColumnType("bigint");
-
- b.Property("IsImage")
- .HasColumnType("bit");
-
- b.Property("MoveRequired")
- .HasColumnType("bit");
-
- b.Property("UpdatedBy")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("UpdatedOn")
- .HasColumnType("datetimeoffset");
-
- b.ComplexProperty>("DeletionStatus", "AStar.Dev.Infrastructure.FilesDb.Models.FileDetail.DeletionStatus#DeletionStatus", b1 =>
- {
- b1.IsRequired();
-
- b1.Property("HardDeletePending")
- .HasColumnType("datetimeoffset")
- .HasColumnName("HardDeletePending");
-
- b1.Property("SoftDeletePending")
- .HasColumnType("datetimeoffset")
- .HasColumnName("SoftDeletePending");
-
- b1.Property("SoftDeleted")
- .HasColumnType("datetimeoffset")
- .HasColumnName("SoftDeleted");
- });
-
- b.ComplexProperty>("ImageDetail", "AStar.Dev.Infrastructure.FilesDb.Models.FileDetail.ImageDetail#ImageDetail", b1 =>
- {
- b1.IsRequired();
-
- b1.Property("Height")
- .HasColumnType("int")
- .HasColumnName("ImageHeight");
-
- b1.Property("Width")
- .HasColumnType("int")
- .HasColumnName("ImageWidth");
- });
-
- b.HasKey("Id");
-
- b.HasIndex("FileHandle");
-
- b.HasIndex("FileName");
-
- b.HasIndex("FileSize");
-
- b.ToTable("FileDetail", "files");
- });
-
- modelBuilder.Entity("AStar.Dev.Infrastructure.FilesDb.Models.FileNamePart", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("FileClassificationId")
- .HasColumnType("int");
-
- b.Property("Text")
- .IsRequired()
- .HasMaxLength(150)
- .HasColumnType("nvarchar(150)");
-
- b.HasKey("Id");
-
- b.HasIndex("FileClassificationId");
-
- b.ToTable("FileNamePart", "files");
- });
-
- modelBuilder.Entity("FileClassificationFileDetail", b =>
- {
- b.Property("FileClassificationsId")
- .HasColumnType("int");
-
- b.Property("FileDetailsId")
- .HasColumnType("int");
-
- b.HasKey("FileClassificationsId", "FileDetailsId");
-
- b.HasIndex("FileDetailsId");
-
- b.ToTable("FileClassificationFileDetail", "files");
- });
-
- modelBuilder.Entity("FileClassificationFileNamePart", b =>
- {
- b.Property("FileClassificationsId")
- .HasColumnType("int");
-
- b.Property("FileNamePartsId")
- .HasColumnType("int");
-
- b.HasKey("FileClassificationsId", "FileNamePartsId");
-
- b.HasIndex("FileNamePartsId");
-
- b.ToTable("FileClassificationFileNamePart", "files");
- });
-
- modelBuilder.Entity("AStar.Dev.Infrastructure.FilesDb.Models.FileNamePart", b =>
- {
- b.HasOne("AStar.Dev.Infrastructure.FilesDb.Models.FileClassification", null)
- .WithMany()
- .HasForeignKey("FileClassificationId");
- });
-
- modelBuilder.Entity("FileClassificationFileDetail", b =>
- {
- b.HasOne("AStar.Dev.Infrastructure.FilesDb.Models.FileClassification", null)
- .WithMany()
- .HasForeignKey("FileClassificationsId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("AStar.Dev.Infrastructure.FilesDb.Models.FileDetail", null)
- .WithMany()
- .HasForeignKey("FileDetailsId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("FileClassificationFileNamePart", b =>
- {
- b.HasOne("AStar.Dev.Infrastructure.FilesDb.Models.FileClassification", null)
- .WithMany()
- .HasForeignKey("FileClassificationsId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("AStar.Dev.Infrastructure.FilesDb.Models.FileNamePart", null)
- .WithMany()
- .HasForeignKey("FileNamePartsId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/Migrations/20250725184934_RecreateAgain.cs b/src/AStar.Dev.Infrastructure.FilesDb/Migrations/20250725184934_RecreateAgain.cs
deleted file mode 100644
index 01badff..0000000
--- a/src/AStar.Dev.Infrastructure.FilesDb/Migrations/20250725184934_RecreateAgain.cs
+++ /dev/null
@@ -1,218 +0,0 @@
-using Microsoft.EntityFrameworkCore.Migrations;
-
-#nullable disable
-
-namespace AStar.Dev.Infrastructure.FilesDb.Migrations;
-
-///
-public partial class RecreateAgain : Migration
-{
- ///
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- _ = migrationBuilder.EnsureSchema(
- name: "files");
-
- _ = migrationBuilder.CreateTable(
- name: "Event",
- schema: "files",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- EventOccurredAt = table.Column(type: "datetimeoffset", nullable: false),
- FileName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false),
- DirectoryName = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false),
- Handle = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: false),
- Width = table.Column(type: "int", nullable: true),
- Height = table.Column(type: "int", nullable: true),
- FileSize = table.Column(type: "bigint", nullable: false),
- FileCreated = table.Column(type: "datetimeoffset", nullable: false),
- FileLastModified = table.Column(type: "datetimeoffset", nullable: false),
- UpdatedBy = table.Column(type: "nvarchar(30)", maxLength: 30, nullable: false),
- EventName = table.Column(type: "nvarchar(max)", nullable: false),
- EventType = table.Column(type: "int", nullable: false)
- },
- constraints: table => _ = table.PrimaryKey("PK_Event", x => x.Id));
-
- _ = migrationBuilder.CreateTable(
- name: "FileClassification",
- schema: "files",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- Name = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false),
- Celebrity = table.Column(type: "bit", nullable: false)
- },
- constraints: table => _ = table.PrimaryKey("PK_FileClassification", x => x.Id));
-
- _ = migrationBuilder.CreateTable(
- name: "FileDetail",
- schema: "files",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false),
- FileName = table.Column(type: "nvarchar(256)", nullable: false),
- FileSize = table.Column(type: "bigint", nullable: false),
- IsImage = table.Column(type: "bit", nullable: false),
- FileHandle = table.Column(type: "nvarchar(256)", nullable: false),
- FileCreated = table.Column(type: "datetimeoffset", nullable: false),
- FileLastModified = table.Column(type: "datetimeoffset", nullable: false),
- FileLastViewed = table.Column(type: "datetimeoffset", nullable: true),
- MoveRequired = table.Column(type: "bit", nullable: false),
- HardDeletePending = table.Column(type: "datetimeoffset", nullable: true),
- SoftDeletePending = table.Column(type: "datetimeoffset", nullable: true),
- SoftDeleted = table.Column(type: "datetimeoffset", nullable: true),
- ImageHeight = table.Column(type: "int", nullable: true),
- ImageWidth = table.Column(type: "int", nullable: true),
- UpdatedBy = table.Column(type: "nvarchar(max)", nullable: false),
- UpdatedOn = table.Column(type: "datetimeoffset", nullable: false)
- },
- constraints: table => _ = table.PrimaryKey("PK_FileDetail", x => x.Id));
-
- _ = migrationBuilder.CreateTable(
- name: "FileNamePart",
- schema: "files",
- columns: table => new
- {
- Id = table.Column(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- Text = table.Column(type: "nvarchar(150)", maxLength: 150, nullable: false),
- FileClassificationId = table.Column(type: "int", nullable: true)
- },
- constraints: table =>
- {
- _ = table.PrimaryKey("PK_FileNamePart", x => x.Id);
-
- _ = table.ForeignKey(
- name: "FK_FileNamePart_FileClassification_FileClassificationId",
- column: x => x.FileClassificationId,
- principalSchema: "files",
- principalTable: "FileClassification",
- principalColumn: "Id");
- });
-
- _ = migrationBuilder.CreateTable(
- name: "FileClassificationFileDetail",
- schema: "files",
- columns: table => new
- {
- FileClassificationsId = table.Column(type: "int", nullable: false),
- FileDetailsId = table.Column(type: "int", nullable: false)
- },
- constraints: table =>
- {
- _ = table.PrimaryKey("PK_FileClassificationFileDetail", x => new { x.FileClassificationsId, x.FileDetailsId });
-
- _ = table.ForeignKey(
- name: "FK_FileClassificationFileDetail_FileClassification_FileClassificationsId",
- column: x => x.FileClassificationsId,
- principalSchema: "files",
- principalTable: "FileClassification",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
-
- _ = table.ForeignKey(
- name: "FK_FileClassificationFileDetail_FileDetail_FileDetailsId",
- column: x => x.FileDetailsId,
- principalSchema: "files",
- principalTable: "FileDetail",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- _ = migrationBuilder.CreateTable(
- name: "FileClassificationFileNamePart",
- schema: "files",
- columns: table => new
- {
- FileClassificationsId = table.Column(type: "int", nullable: false),
- FileNamePartsId = table.Column(type: "int", nullable: false)
- },
- constraints: table =>
- {
- _ = table.PrimaryKey("PK_FileClassificationFileNamePart", x => new { x.FileClassificationsId, x.FileNamePartsId });
-
- _ = table.ForeignKey(
- name: "FK_FileClassificationFileNamePart_FileClassification_FileClassificationsId",
- column: x => x.FileClassificationsId,
- principalSchema: "files",
- principalTable: "FileClassification",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
-
- _ = table.ForeignKey(
- name: "FK_FileClassificationFileNamePart_FileNamePart_FileNamePartsId",
- column: x => x.FileNamePartsId,
- principalSchema: "files",
- principalTable: "FileNamePart",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- _ = migrationBuilder.CreateIndex(
- name: "IX_FileClassificationFileDetail_FileDetailsId",
- schema: "files",
- table: "FileClassificationFileDetail",
- column: "FileDetailsId");
-
- _ = migrationBuilder.CreateIndex(
- name: "IX_FileClassificationFileNamePart_FileNamePartsId",
- schema: "files",
- table: "FileClassificationFileNamePart",
- column: "FileNamePartsId");
-
- _ = migrationBuilder.CreateIndex(
- name: "IX_FileDetail_FileHandle",
- schema: "files",
- table: "FileDetail",
- column: "FileHandle");
-
- _ = migrationBuilder.CreateIndex(
- name: "IX_FileDetail_FileName",
- schema: "files",
- table: "FileDetail",
- column: "FileName");
-
- _ = migrationBuilder.CreateIndex(
- name: "IX_FileDetail_FileSize",
- schema: "files",
- table: "FileDetail",
- column: "FileSize");
-
- _ = migrationBuilder.CreateIndex(
- name: "IX_FileNamePart_FileClassificationId",
- schema: "files",
- table: "FileNamePart",
- column: "FileClassificationId");
- }
-
- ///
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- _ = migrationBuilder.DropTable(
- name: "Event",
- schema: "files");
-
- _ = migrationBuilder.DropTable(
- name: "FileClassificationFileDetail",
- schema: "files");
-
- _ = migrationBuilder.DropTable(
- name: "FileClassificationFileNamePart",
- schema: "files");
-
- _ = migrationBuilder.DropTable(
- name: "FileDetail",
- schema: "files");
-
- _ = migrationBuilder.DropTable(
- name: "FileNamePart",
- schema: "files");
-
- _ = migrationBuilder.DropTable(
- name: "FileClassification",
- schema: "files");
- }
-}
\ No newline at end of file
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/Migrations/20250725190252_RecreateAgain2.Designer.cs b/src/AStar.Dev.Infrastructure.FilesDb/Migrations/20250725190252_RecreateAgain2.Designer.cs
deleted file mode 100644
index 25147bd..0000000
--- a/src/AStar.Dev.Infrastructure.FilesDb/Migrations/20250725190252_RecreateAgain2.Designer.cs
+++ /dev/null
@@ -1,351 +0,0 @@
-//
-
-using System.Collections.Generic;
-using AStar.Dev.Infrastructure.FilesDb.Data;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
-#nullable disable
-
-namespace AStar.Dev.Infrastructure.FilesDb.Migrations
-{
- [DbContext(typeof(FilesContext))]
- [Migration("20250725190252_RecreateAgain2")]
- partial class RecreateAgain2
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasDefaultSchema("files")
- .UseCollation("SQL_Latin1_General_CP1_CI_AS")
- .HasAnnotation("ProductVersion", "9.0.7")
- .HasAnnotation("Relational:MaxIdentifierLength", 128);
-
- SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
-
- modelBuilder.Entity("AStar.Dev.Infrastructure.FilesDb.Models.DuplicateDetail", b =>
- {
- b.Property("DirectoryName")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("FileHandle")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("FileLastViewed")
- .HasColumnType("datetimeoffset");
-
- b.Property("FileName")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("FileSize")
- .HasColumnType("bigint");
-
- b.Property("HardDeletePending")
- .HasColumnType("datetimeoffset");
-
- b.Property("ImageHeight")
- .HasColumnType("int");
-
- b.Property("ImageWidth")
- .HasColumnType("int");
-
- b.Property("Instances")
- .HasColumnType("int");
-
- b.Property("IsImage")
- .HasColumnType("bit");
-
- b.Property("MoveRequired")
- .HasColumnType("bit");
-
- b.Property("SoftDeletePending")
- .HasColumnType("datetimeoffset");
-
- b.Property("SoftDeleted")
- .HasColumnType("datetimeoffset");
-
- b.Property("UpdatedOn")
- .HasColumnType("datetimeoffset");
-
- b.ToTable((string)null);
-
- b.ToView("vw_DuplicateDetails", "files");
- });
-
- modelBuilder.Entity("AStar.Dev.Infrastructure.FilesDb.Models.Event", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("DirectoryName")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("EventOccurredAt")
- .HasColumnType("datetimeoffset");
-
- b.Property("FileCreated")
- .HasColumnType("datetimeoffset");
-
- b.Property("FileLastModified")
- .HasColumnType("datetimeoffset");
-
- b.Property("FileName")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("FileSize")
- .HasColumnType("bigint");
-
- b.Property("Handle")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("Height")
- .HasColumnType("int");
-
- b.Property("UpdatedBy")
- .IsRequired()
- .HasMaxLength(30)
- .HasColumnType("nvarchar(30)");
-
- b.Property("Width")
- .HasColumnType("int");
-
- b.ComplexProperty>("Type", "AStar.Dev.Infrastructure.FilesDb.Models.Event.Type#EventType", b1 =>
- {
- b1.IsRequired();
-
- b1.Property("Name")
- .IsRequired()
- .HasColumnType("nvarchar(max)")
- .HasColumnName("EventName");
-
- b1.Property("Value")
- .HasColumnType("int")
- .HasColumnName("EventType");
- });
-
- b.HasKey("Id");
-
- b.ToTable("Event", "files");
- });
-
- modelBuilder.Entity("AStar.Dev.Infrastructure.FilesDb.Models.FileClassification", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("Celebrity")
- .HasColumnType("bit");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(150)
- .HasColumnType("nvarchar(150)");
-
- b.HasKey("Id");
-
- b.ToTable("FileClassification", "files");
- });
-
- modelBuilder.Entity("AStar.Dev.Infrastructure.FilesDb.Models.FileDetail", b =>
- {
- b.Property("Id")
- .HasColumnType("int");
-
- b.Property("FileCreated")
- .HasColumnType("datetimeoffset");
-
- b.Property("FileHandle")
- .IsRequired()
- .HasColumnType("nvarchar(256)");
-
- b.Property("FileLastModified")
- .HasColumnType("datetimeoffset");
-
- b.Property("FileLastViewed")
- .HasColumnType("datetimeoffset");
-
- b.Property("FileName")
- .IsRequired()
- .HasColumnType("nvarchar(256)");
-
- b.Property("FileSize")
- .HasColumnType("bigint");
-
- b.Property("IsImage")
- .HasColumnType("bit");
-
- b.Property("MoveRequired")
- .HasColumnType("bit");
-
- b.Property("UpdatedBy")
- .IsRequired()
- .HasColumnType("nvarchar(max)");
-
- b.Property("UpdatedOn")
- .HasColumnType("datetimeoffset");
-
- b.ComplexProperty>("DeletionStatus", "AStar.Dev.Infrastructure.FilesDb.Models.FileDetail.DeletionStatus#DeletionStatus", b1 =>
- {
- b1.IsRequired();
-
- b1.Property("HardDeletePending")
- .HasColumnType("datetimeoffset")
- .HasColumnName("HardDeletePending");
-
- b1.Property("SoftDeletePending")
- .HasColumnType("datetimeoffset")
- .HasColumnName("SoftDeletePending");
-
- b1.Property("SoftDeleted")
- .HasColumnType("datetimeoffset")
- .HasColumnName("SoftDeleted");
- });
-
- b.ComplexProperty>("DirectoryName", "AStar.Dev.Infrastructure.FilesDb.Models.FileDetail.DirectoryName#DirectoryName", b1 =>
- {
- b1.Property("Value")
- .IsRequired()
- .HasColumnType("nvarchar(256)")
- .HasColumnName("DirectoryName");
- });
-
- b.ComplexProperty>("ImageDetail", "AStar.Dev.Infrastructure.FilesDb.Models.FileDetail.ImageDetail#ImageDetail", b1 =>
- {
- b1.IsRequired();
-
- b1.Property("Height")
- .HasColumnType("int")
- .HasColumnName("ImageHeight");
-
- b1.Property("Width")
- .HasColumnType("int")
- .HasColumnName("ImageWidth");
- });
-
- b.HasKey("Id");
-
- b.HasIndex("FileHandle");
-
- b.HasIndex("FileName");
-
- b.HasIndex("FileSize");
-
- b.ToTable("FileDetail", "files");
- });
-
- modelBuilder.Entity("AStar.Dev.Infrastructure.FilesDb.Models.FileNamePart", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("FileClassificationId")
- .HasColumnType("int");
-
- b.Property("Text")
- .IsRequired()
- .HasMaxLength(150)
- .HasColumnType("nvarchar(150)");
-
- b.HasKey("Id");
-
- b.HasIndex("FileClassificationId");
-
- b.ToTable("FileNamePart", "files");
- });
-
- modelBuilder.Entity("FileClassificationFileDetail", b =>
- {
- b.Property("FileClassificationsId")
- .HasColumnType("int");
-
- b.Property("FileDetailsId")
- .HasColumnType("int");
-
- b.HasKey("FileClassificationsId", "FileDetailsId");
-
- b.HasIndex("FileDetailsId");
-
- b.ToTable("FileClassificationFileDetail", "files");
- });
-
- modelBuilder.Entity("FileClassificationFileNamePart", b =>
- {
- b.Property("FileClassificationsId")
- .HasColumnType("int");
-
- b.Property("FileNamePartsId")
- .HasColumnType("int");
-
- b.HasKey("FileClassificationsId", "FileNamePartsId");
-
- b.HasIndex("FileNamePartsId");
-
- b.ToTable("FileClassificationFileNamePart", "files");
- });
-
- modelBuilder.Entity("AStar.Dev.Infrastructure.FilesDb.Models.FileNamePart", b =>
- {
- b.HasOne("AStar.Dev.Infrastructure.FilesDb.Models.FileClassification", null)
- .WithMany()
- .HasForeignKey("FileClassificationId");
- });
-
- modelBuilder.Entity("FileClassificationFileDetail", b =>
- {
- b.HasOne("AStar.Dev.Infrastructure.FilesDb.Models.FileClassification", null)
- .WithMany()
- .HasForeignKey("FileClassificationsId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("AStar.Dev.Infrastructure.FilesDb.Models.FileDetail", null)
- .WithMany()
- .HasForeignKey("FileDetailsId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("FileClassificationFileNamePart", b =>
- {
- b.HasOne("AStar.Dev.Infrastructure.FilesDb.Models.FileClassification", null)
- .WithMany()
- .HasForeignKey("FileClassificationsId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("AStar.Dev.Infrastructure.FilesDb.Models.FileNamePart", null)
- .WithMany()
- .HasForeignKey("FileNamePartsId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/Migrations/20250725190252_RecreateAgain2.cs b/src/AStar.Dev.Infrastructure.FilesDb/Migrations/20250725190252_RecreateAgain2.cs
deleted file mode 100644
index 821b1f2..0000000
--- a/src/AStar.Dev.Infrastructure.FilesDb/Migrations/20250725190252_RecreateAgain2.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using Microsoft.EntityFrameworkCore.Migrations;
-
-#nullable disable
-
-namespace AStar.Dev.Infrastructure.FilesDb.Migrations;
-
-///
-public partial class RecreateAgain2 : Migration
-{
- ///
- protected override void Up(MigrationBuilder migrationBuilder)
- => migrationBuilder.AddColumn(
- name: "DirectoryName",
- schema: "files",
- table: "FileDetail",
- type: "nvarchar(256)",
- nullable: false,
- defaultValue: "");
-
- ///
- protected override void Down(MigrationBuilder migrationBuilder)
- => migrationBuilder.DropColumn(
- name: "DirectoryName",
- schema: "files",
- table: "FileDetail");
-}
\ No newline at end of file
diff --git a/src/AStar.Dev.Infrastructure.FilesDb/Migrations/20250729201535_UpdateFileNameConfiguration.Designer.cs b/src/AStar.Dev.Infrastructure.FilesDb/Migrations/20250729201535_UpdateFileNameConfiguration.Designer.cs
deleted file mode 100644
index a83c27b..0000000
--- a/src/AStar.Dev.Infrastructure.FilesDb/Migrations/20250729201535_UpdateFileNameConfiguration.Designer.cs
+++ /dev/null
@@ -1,353 +0,0 @@
-//
-
-using System.Collections.Generic;
-using AStar.Dev.Infrastructure.FilesDb.Data;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
-#nullable disable
-
-namespace AStar.Dev.Infrastructure.FilesDb.Migrations
-{
- [DbContext(typeof(FilesContext))]
- [Migration("20250729201535_UpdateFileNameConfiguration")]
- partial class UpdateFileNameConfiguration
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasDefaultSchema("files")
- .UseCollation("SQL_Latin1_General_CP1_CI_AS")
- .HasAnnotation("ProductVersion", "9.0.7")
- .HasAnnotation("Relational:MaxIdentifierLength", 128);
-
- SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
-
- modelBuilder.Entity("AStar.Dev.Infrastructure.FilesDb.Models.DuplicateDetail", b =>
- {
- b.Property("DirectoryName")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("FileHandle")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("FileLastViewed")
- .HasColumnType("datetimeoffset");
-
- b.Property("FileName")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("FileSize")
- .HasColumnType("bigint");
-
- b.Property("HardDeletePending")
- .HasColumnType("datetimeoffset");
-
- b.Property("ImageHeight")
- .HasColumnType("int");
-
- b.Property("ImageWidth")
- .HasColumnType("int");
-
- b.Property("Instances")
- .HasColumnType("int");
-
- b.Property("IsImage")
- .HasColumnType("bit");
-
- b.Property("MoveRequired")
- .HasColumnType("bit");
-
- b.Property("SoftDeletePending")
- .HasColumnType("datetimeoffset");
-
- b.Property("SoftDeleted")
- .HasColumnType("datetimeoffset");
-
- b.Property("UpdatedOn")
- .HasColumnType("datetimeoffset");
-
- b.ToTable((string)null);
-
- b.ToView("vw_DuplicateDetails", "files");
- });
-
- modelBuilder.Entity("AStar.Dev.Infrastructure.FilesDb.Models.Event", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("DirectoryName")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("EventOccurredAt")
- .HasColumnType("datetimeoffset");
-
- b.Property("FileCreated")
- .HasColumnType("datetimeoffset");
-
- b.Property("FileLastModified")
- .HasColumnType("datetimeoffset");
-
- b.Property("FileName")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("FileSize")
- .HasColumnType("bigint");
-
- b.Property("Handle")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("Height")
- .HasColumnType("int");
-
- b.Property("UpdatedBy")
- .IsRequired()
- .HasMaxLength(30)
- .HasColumnType("nvarchar(30)");
-
- b.Property("Width")
- .HasColumnType("int");
-
- b.ComplexProperty>("Type", "AStar.Dev.Infrastructure.FilesDb.Models.Event.Type#EventType", b1 =>
- {
- b1.IsRequired();
-
- b1.Property("Name")
- .IsRequired()
- .HasColumnType("nvarchar(max)")
- .HasColumnName("EventName");
-
- b1.Property("Value")
- .HasColumnType("int")
- .HasColumnName("EventType");
- });
-
- b.HasKey("Id");
-
- b.ToTable("Event", "files");
- });
-
- modelBuilder.Entity("AStar.Dev.Infrastructure.FilesDb.Models.FileClassification", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("int");
-
- SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
-
- b.Property("Celebrity")
- .HasColumnType("bit");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(150)
- .HasColumnType("nvarchar(150)");
-
- b.HasKey("Id");
-
- b.ToTable("FileClassification", "files");
- });
-
- modelBuilder.Entity("AStar.Dev.Infrastructure.FilesDb.Models.FileDetail", b =>
- {
- b.Property("Id")
- .HasColumnType("int");
-
- b.Property("FileCreated")
- .HasColumnType("datetimeoffset");
-
- b.Property("FileHandle")
- .IsRequired()
- .HasColumnType("nvarchar(256)");
-
- b.Property("FileLastModified")
- .HasColumnType("datetimeoffset");
-
- b.Property("FileLastViewed")
- .HasColumnType("datetimeoffset");
-
- b.Property("FileSize")
- .HasColumnType("bigint");
-
- b.Property("IsImage")
- .HasColumnType("bit");
-
- b.Property("MoveRequired")
- .HasColumnType("bit");
-
- b.Property