MyBookmark/Modules.Rating.Api/Migrations/RatingDbContextModelSnapshot.cs
2025-01-20 00:49:51 +03:00

54 lines
1.8 KiB
C#

// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
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))]
partial class RatingDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(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<Guid>("SubjectId")
.HasColumnType("uuid");
b.Property<Guid>("ObjectId")
.HasColumnType("uuid");
b.Property<DateTime>("LastUpdate")
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("now()");
b.Property<int>("RatingPercentage")
.HasColumnType("integer");
b.Property<DateTime>("VoteDate")
.ValueGeneratedOnAdd()
.HasColumnType("timestamp with time zone")
.HasDefaultValueSql("now()");
b.HasKey("SubjectId", "ObjectId");
b.ToTable("Votes");
});
#pragma warning restore 612, 618
}
}
}