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

57 lines
1.9 KiB
C#

// <auto-generated />
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
{
/// <inheritdoc />
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<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
}
}
}