forked from gongxuegit/tiku-backend.net
feat: add content platform operations persistence
This commit is contained in:
@@ -35,6 +35,11 @@ internal sealed class ContentAssetConfiguration : IEntityTypeConfiguration<Conte
|
||||
builder.Property(entity => entity.VerificationDetails).IsJson("{}");
|
||||
builder.Property(entity => entity.PreviewObjectKey).HasMaxLength(1000);
|
||||
builder.Property(entity => entity.PreviewStatus).HasSnakeCaseEnum();
|
||||
builder.Property(entity => entity.SecurityScanStatus)
|
||||
.HasSnakeCaseEnum()
|
||||
.HasDefaultValue(AssetSecurityScanStatus.NotRequired);
|
||||
builder.Property(entity => entity.SecurityScanProvider).HasMaxLength(100);
|
||||
builder.Property(entity => entity.SecurityScanSummary).IsJson("{}");
|
||||
builder.Property(entity => entity.SecurityFlags).IsJson("{}");
|
||||
builder.Property(entity => entity.Metadata).IsJson("{}");
|
||||
builder.HasIndex(entity => new { entity.TenantId, entity.LegacyId }).IsUnique();
|
||||
@@ -67,6 +72,14 @@ internal sealed class ContentAssetConfiguration : IEntityTypeConfiguration<Conte
|
||||
});
|
||||
builder.HasIndex(entity => new { entity.TenantId, entity.PreviewStatus })
|
||||
.HasFilter("preview_status <> 'none'");
|
||||
builder.HasIndex(entity => new
|
||||
{
|
||||
entity.TenantId,
|
||||
entity.SecurityScanStatus,
|
||||
entity.UploadStatus,
|
||||
entity.Status,
|
||||
entity.UpdatedAt
|
||||
});
|
||||
builder.ToTable(table =>
|
||||
{
|
||||
table.HasCheckConstraint("ck_content_assets_file_size", "file_size_bytes is null or file_size_bytes >= 0");
|
||||
|
||||
Reference in New Issue
Block a user