- Nouveau parametre global Precision_Distance (sous-menu Application de la Page_Parametrage, entre Compte et Vehicules), persiste via une entite singleton ParametresApplication, expose par GET/PUT /api/parametres-application - Arrondi superieur (ceiling) applique a l'affichage et aux agregats : trajet simple, aller/retour (arrondi puis doublement), totaux jour/mois/annee, carte, export PDF et bareme kilometrique - jamais a la distance brute stockee - Refonte du Montant_Previsionnel : le montant mensuel (80%) porte desormais sur le seul mois affiche (tranche determinee par le cumul annuel) ; nouvelle ligne Montant_Previsionnel_Annuel (100%, sans minoration, sur le cumul) - Backend : PrecisionDistanceService (ArrondirDistance), integration dans ResumeService/TotauxService/RemboursementService/MontantRegleService, migration EF Core ; 7 tests de propriete (FsCheck) + tests existants, 62/62 verts - Frontend : ParametresApplicationService (signal partage), composant de parametrage, fonction miroir arrondirDistance, adaptation de la liste des trajets, du panneau des totaux, de la carte et des montants regles - Specs : nouvelle spec precision-distances-km (requirements/design/tasks) ; mise a jour de requirements.md, design.md et design-requirements.md de schotziad-km-tracker (Requirement 22, renvois croises, Montant_Previsionnel) - Suppression du fichier chromium .deb suivi par erreur dans le depot
416 lines
15 KiB
C#
416 lines
15 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using SchotzIadKmTracker.Api.Data;
|
|
|
|
#nullable disable
|
|
|
|
namespace SchotzIadKmTracker.Api.Data.Migrations
|
|
{
|
|
[DbContext(typeof(AppDbContext))]
|
|
[Migration("20260925082429_AjoutParametresApplication")]
|
|
partial class AjoutParametresApplication
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder.HasAnnotation("ProductVersion", "8.0.8");
|
|
|
|
modelBuilder.Entity("SchotzIadKmTracker.Api.Models.Entities.AdresseCache", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Adresse")
|
|
.IsRequired()
|
|
.HasMaxLength(255)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("DerniereUtilisation")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("GeometrieJson")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<double>("Latitude")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<double>("Longitude")
|
|
.HasColumnType("REAL");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Adresse")
|
|
.IsUnique();
|
|
|
|
b.ToTable("AdresseCache", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("SchotzIadKmTracker.Api.Models.Entities.AdresseNommee", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Adresse")
|
|
.IsRequired()
|
|
.HasMaxLength(255)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Denomination")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("DenominationNormalisee")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<bool>("GeocodageReussi")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<double?>("Latitude")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<double?>("Longitude")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex(new[] { "DenominationNormalisee" }, "UX_AdresseNommee_Denomination")
|
|
.IsUnique();
|
|
|
|
b.ToTable("AdressesNommees", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("SchotzIadKmTracker.Api.Models.Entities.Compte", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Email")
|
|
.IsRequired()
|
|
.HasMaxLength(255)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("MotDePasseHash")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex(new[] { "Email" }, "UX_Comptes_Email")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Comptes", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("SchotzIadKmTracker.Api.Models.Entities.MontantRegle", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("Annee")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("Mois")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<decimal>("Montant")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("VehiculeId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("VehiculeId");
|
|
|
|
b.HasIndex(new[] { "Annee", "Mois", "VehiculeId" }, "UX_MontantsRegles_Periode_Vehicule")
|
|
.IsUnique();
|
|
|
|
b.ToTable("MontantsRegles", null, t =>
|
|
{
|
|
t.HasCheckConstraint("CK_MontantsRegles_Mois", "\"Mois\" BETWEEN 1 AND 12");
|
|
|
|
t.HasCheckConstraint("CK_MontantsRegles_Montant", "\"Montant\" >= 0");
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("SchotzIadKmTracker.Api.Models.Entities.ParametresApplication", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("PrecisionDistanceKm")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex(new[] { "Id" }, "UX_ParametresApplication_Singleton")
|
|
.IsUnique();
|
|
|
|
b.ToTable("ParametresApplication", null, t =>
|
|
{
|
|
t.HasCheckConstraint("CK_ParametresApplication_PrecisionDistanceKm", "\"PrecisionDistanceKm\" IN (0, 1, 2)");
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("SchotzIadKmTracker.Api.Models.Entities.Profil", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("AdresseDomicile")
|
|
.HasMaxLength(255)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<bool>("DomicileGeocode")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<double?>("DomicileLatitude")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<double?>("DomicileLongitude")
|
|
.HasColumnType("REAL");
|
|
|
|
b.Property<string>("Matricule")
|
|
.HasMaxLength(8)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Nom")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Prenom")
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex(new[] { "Id" }, "UX_Profil_Singleton")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Profil", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("SchotzIadKmTracker.Api.Models.Entities.ResetPasswordToken", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("Expiration")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("TokenHash")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime?>("UsedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex(new[] { "Expiration" }, "IX_ResetTokens_Expiration");
|
|
|
|
b.HasIndex(new[] { "TokenHash" }, "UX_ResetTokens_TokenHash")
|
|
.IsUnique();
|
|
|
|
b.ToTable("ResetPasswordTokens", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("SchotzIadKmTracker.Api.Models.Entities.Trajet", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("AdresseArrivee")
|
|
.IsRequired()
|
|
.HasMaxLength(255)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("AdresseDepart")
|
|
.IsRequired()
|
|
.HasMaxLength(255)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<bool>("AllerRetour")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Commentaire")
|
|
.HasMaxLength(500)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateOnly>("Date")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<decimal?>("Distance")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("GeometrieJson")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<decimal>("Position")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("PuissanceFiscale")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("VehiculeId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex(new[] { "Date" }, "IX_Trajets_Date");
|
|
|
|
b.HasIndex(new[] { "Date", "Position" }, "IX_Trajets_Date_Position");
|
|
|
|
b.HasIndex(new[] { "VehiculeId" }, "IX_Trajets_Vehicule");
|
|
|
|
b.ToTable("Trajets", null, t =>
|
|
{
|
|
t.HasCheckConstraint("CK_Trajets_Distance", "\"Distance\" IS NULL OR \"Distance\" > 0");
|
|
|
|
t.HasCheckConstraint("CK_Trajets_PuissanceFiscale", "\"PuissanceFiscale\" > 0");
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("SchotzIadKmTracker.Api.Models.Entities.TrancheBareme", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("Annee")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<decimal>("Base")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<decimal>("Coefficient")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<decimal?>("KmMax")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<decimal>("KmMin")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("PuissanceFiscale")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex(new[] { "Annee", "PuissanceFiscale" }, "IX_TranchesBareme_Annee_PF");
|
|
|
|
b.ToTable("TranchesBareme", null, t =>
|
|
{
|
|
t.HasCheckConstraint("CK_TranchesBareme_Km", "\"KmMax\" IS NULL OR CAST(\"KmMin\" AS REAL) < CAST(\"KmMax\" AS REAL)");
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("SchotzIadKmTracker.Api.Models.Entities.Vehicule", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<DateOnly>("DateEffet")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Denomination")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Plaque")
|
|
.IsRequired()
|
|
.HasMaxLength(15)
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("PuissanceFiscale")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex(new[] { "DateEffet" }, "IX_Vehicules_DateEffet");
|
|
|
|
b.ToTable("Vehicules", null, t =>
|
|
{
|
|
t.HasCheckConstraint("CK_Vehicules_PuissanceFiscale", "\"PuissanceFiscale\" > 0");
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("SchotzIadKmTracker.Api.Models.Entities.MontantRegle", b =>
|
|
{
|
|
b.HasOne("SchotzIadKmTracker.Api.Models.Entities.Vehicule", "Vehicule")
|
|
.WithMany()
|
|
.HasForeignKey("VehiculeId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Vehicule");
|
|
});
|
|
|
|
modelBuilder.Entity("SchotzIadKmTracker.Api.Models.Entities.Trajet", b =>
|
|
{
|
|
b.HasOne("SchotzIadKmTracker.Api.Models.Entities.Vehicule", "Vehicule")
|
|
.WithMany("Trajets")
|
|
.HasForeignKey("VehiculeId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Vehicule");
|
|
});
|
|
|
|
modelBuilder.Entity("SchotzIadKmTracker.Api.Models.Entities.Vehicule", b =>
|
|
{
|
|
b.Navigation("Trajets");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|