Database migration, repository, controller and service

This commit is contained in:
Nickk888 committed 2026-10-09 16:32:38 +02:00
1 parent 07e4e6b381
commit 4fb8768807
17 files changed
+368 -44

No files matched your search

+8 -1
View File
@@ -1,5 +1,5 @@
using System;
using Microsoft.EntityFrameworkCore;
using PaperlessAI.Models;
namespace PaperlessAI.Context;
@@ -19,6 +19,13 @@ public class MyDbContext : DbContext
modelBuilder
.UseCollation("utf8mb4_uca1400_ai_ci")
.HasCharSet("utf8mb4");
modelBuilder
.Entity<PaperlessDocument>()
.HasIndex(x => x.DocumentId)
.IsUnique();
}
public DbSet<PaperlessDocument> PaperlessDocuments { get; set; }
}