Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
<RepositoryUrl>https://github.com/astar-development/astar-dev-infrastructure-filesdb.git</RepositoryUrl>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<Title>AStar Dev Infrastructure FilesDb</Title>
<PackageReleaseNotes>Rework the File Classifications area and update for AStar Functional Results.</PackageReleaseNotes>
<Version>0.2.0</Version>
<PackageReleaseNotes>Rework the Image Details and Add File Created date.</PackageReleaseNotes>
<Version>0.2.1</Version>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -61,6 +61,10 @@
</PackageReference>
</ItemGroup>

<ItemGroup>
<Folder Include="Migrations\" />
</ItemGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<NoWarn>1701;1702;</NoWarn>
Expand Down

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace AStar.Dev.Infrastructure.FilesDb.Configurations;
namespace AStar.Dev.Infrastructure.FilesDb.Data.Configurations;

/// <summary>
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -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<DeletionStatus>
internal sealed class DeletionStatusConfiguration : IEntityTypeConfiguration<DeletionStatus>
{
public void Configure(ComplexPropertyBuilder<DeletionStatus> builder)
public void Configure(EntityTypeBuilder<DeletionStatus> builder)
{
_ = builder
.ToTable(nameof(DeletionStatus), Constants.SchemaName)
.HasKey(deletionStatus => deletionStatus.Id);

_ = builder
.Property(deletionStatus => deletionStatus.HardDeletePending)
.HasColumnName("HardDeletePending")
Expand Down
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using AStar.Dev.Infrastructure.Data.Configurations;
using AStar.Dev.Infrastructure.FilesDb.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/// <summary>
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ public void Configure(EntityTypeBuilder<FileClassification> builder)
.ToTable(nameof(FileClassification), Constants.SchemaName)
.HasKey(fileClassification => fileClassification.Id);

_ = builder.HasMany<FileNamePart>();
_ = builder.HasIndex(fileClassification => fileClassification.Name).IsUnique();

//_ = builder.HasMany<FileNamePart>();
_ = builder.Property(fileClassification => fileClassification.Name).HasMaxLength(150);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using AStar.Dev.Infrastructure.Data.Configurations;
using AStar.Dev.Infrastructure.FilesDb.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
Expand All @@ -22,22 +21,20 @@ public void Configure(EntityTypeBuilder<FileDetail> 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);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using AStar.Dev.Infrastructure.Data.Configurations;
using AStar.Dev.Infrastructure.FilesDb.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace AStar.Dev.Infrastructure.FilesDb.Configurations;
namespace AStar.Dev.Infrastructure.FilesDb.Data.Configurations;

/// <summary>
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/// <summary>
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/// <summary>
/// </summary>
Expand Down
Loading
Loading