57 lines
1.9 KiB
C#
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("20241101175343_Init")]
|
|
partial class Init
|
|
{
|
|
/// <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.Rate", 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>("RatePercentage")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<DateTime>("VoteDate")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("timestamp with time zone")
|
|
.HasDefaultValueSql("now()");
|
|
|
|
b.HasKey("SubjectId", "ObjectId");
|
|
|
|
b.ToTable("Rates");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|