All checks were successful
continuous-integration/drone/push Build is passing
118 lines
3.8 KiB
C#
118 lines
3.8 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
using Vegasco.Server.Api.Persistence;
|
|
|
|
#nullable disable
|
|
|
|
namespace Vegasco.Server.Api.Persistence.Migrations
|
|
{
|
|
[DbContext(typeof(ApplicationDbContext))]
|
|
[Migration("20250622085121_DropIgnoreInCalculation")]
|
|
partial class DropIgnoreInCalculation
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "9.0.5")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("Vegasco.Server.Api.Cars.Car", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasMaxLength(50)
|
|
.HasColumnType("character varying(50)");
|
|
|
|
b.Property<string>("UserId")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("Cars");
|
|
});
|
|
|
|
modelBuilder.Entity("Vegasco.Server.Api.Consumptions.Consumption", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<double>("Amount")
|
|
.HasColumnType("double precision");
|
|
|
|
b.Property<Guid>("CarId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTimeOffset>("DateTime")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<double>("Distance")
|
|
.HasColumnType("double precision");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CarId");
|
|
|
|
b.ToTable("Consumptions");
|
|
});
|
|
|
|
modelBuilder.Entity("Vegasco.Server.Api.Users.User", b =>
|
|
{
|
|
b.Property<string>("Id")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Users");
|
|
});
|
|
|
|
modelBuilder.Entity("Vegasco.Server.Api.Cars.Car", b =>
|
|
{
|
|
b.HasOne("Vegasco.Server.Api.Users.User", "User")
|
|
.WithMany("Cars")
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("Vegasco.Server.Api.Consumptions.Consumption", b =>
|
|
{
|
|
b.HasOne("Vegasco.Server.Api.Cars.Car", "Car")
|
|
.WithMany("Consumptions")
|
|
.HasForeignKey("CarId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Car");
|
|
});
|
|
|
|
modelBuilder.Entity("Vegasco.Server.Api.Cars.Car", b =>
|
|
{
|
|
b.Navigation("Consumptions");
|
|
});
|
|
|
|
modelBuilder.Entity("Vegasco.Server.Api.Users.User", b =>
|
|
{
|
|
b.Navigation("Cars");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|