// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Modules.Rating.Api.Database; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace Modules.Rating.Api.Migrations { [DbContext(typeof(RatingDbContext))] [Migration("20250109221221_M001")] partial class M001 { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "8.0.10") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("Modules.Rating.Api.Database.Entities.Vote", b => { b.Property("SubjectId") .HasColumnType("uuid"); b.Property("ObjectId") .HasColumnType("uuid"); b.Property("LastUpdate") .ValueGeneratedOnAddOrUpdate() .HasColumnType("timestamp with time zone") .HasDefaultValueSql("now()"); b.Property("RatingPercentage") .HasColumnType("integer"); b.Property("VoteDate") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone") .HasDefaultValueSql("now()"); b.HasKey("SubjectId", "ObjectId"); b.ToTable("Votes"); }); #pragma warning restore 612, 618 } } }