//
using System;
using EngineeringSync.Infrastructure;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace EngineeringSync.Infrastructure.Migrations
{
[DbContext(typeof(AppDbContext))]
[Migration("20260326161840_AddBackupSettingsToProjectConfig")]
partial class AddBackupSettingsToProjectConfig
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "10.0.5");
modelBuilder.Entity("EngineeringSync.Domain.Entities.FileRevision", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("FileHash")
.IsRequired()
.HasColumnType("TEXT");
b.Property("LastModified")
.HasColumnType("TEXT");
b.Property("ProjectId")
.HasColumnType("TEXT");
b.Property("RelativePath")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Size")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("ProjectId", "RelativePath")
.IsUnique();
b.ToTable("FileRevisions");
});
modelBuilder.Entity("EngineeringSync.Domain.Entities.PendingChange", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("ChangeType")
.HasColumnType("INTEGER");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("OldRelativePath")
.HasColumnType("TEXT");
b.Property("ProjectId")
.HasColumnType("TEXT");
b.Property("RelativePath")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Status")
.HasColumnType("INTEGER");
b.Property("SyncedAt")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("ProjectId");
b.ToTable("PendingChanges");
});
modelBuilder.Entity("EngineeringSync.Domain.Entities.ProjectConfig", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property("BackupEnabled")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(true);
b.Property("BackupPath")
.HasColumnType("TEXT");
b.Property("CreatedAt")
.HasColumnType("TEXT");
b.Property("EngineeringPath")
.IsRequired()
.HasColumnType("TEXT");
b.Property("FileExtensions")
.IsRequired()
.HasColumnType("TEXT");
b.Property("IsActive")
.HasColumnType("INTEGER");
b.Property("MaxBackupsPerFile")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER")
.HasDefaultValue(0);
b.Property("Name")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("TEXT");
b.Property("SimulationPath")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Projects");
});
modelBuilder.Entity("EngineeringSync.Domain.Entities.FileRevision", b =>
{
b.HasOne("EngineeringSync.Domain.Entities.ProjectConfig", "Project")
.WithMany("FileRevisions")
.HasForeignKey("ProjectId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Project");
});
modelBuilder.Entity("EngineeringSync.Domain.Entities.PendingChange", b =>
{
b.HasOne("EngineeringSync.Domain.Entities.ProjectConfig", "Project")
.WithMany("PendingChanges")
.HasForeignKey("ProjectId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Project");
});
modelBuilder.Entity("EngineeringSync.Domain.Entities.ProjectConfig", b =>
{
b.Navigation("FileRevisions");
b.Navigation("PendingChanges");
});
#pragma warning restore 612, 618
}
}
}