2024-04-22 21:26:34 +08:00
|
|
|
|
using Canon.Server.Entities;
|
2024-04-19 14:59:45 +08:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using MongoDB.EntityFrameworkCore.Extensions;
|
|
|
|
|
|
|
|
|
|
namespace Canon.Server.Services;
|
|
|
|
|
|
2024-04-29 23:55:36 +08:00
|
|
|
|
public class CompileDbContext(DbContextOptions<CompileDbContext> options) : DbContext(options)
|
2024-04-19 14:59:45 +08:00
|
|
|
|
{
|
|
|
|
|
public DbSet<CompileResult> CompileResults { get; init; }
|
|
|
|
|
|
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
|
|
|
{
|
|
|
|
|
base.OnModelCreating(modelBuilder);
|
|
|
|
|
modelBuilder.Entity<CompileResult>().ToCollection("compilerResults");
|
|
|
|
|
}
|
|
|
|
|
}
|