146 lines
5.1 KiB
C#
146 lines
5.1 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text.Json;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Nashel.Modules.Catalog.Infrastructure.Persistence;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
#nullable disable
|
|
|
|
namespace Nashel.Modules.Catalog.Infrastructure.Persistence.Migrations
|
|
{
|
|
[DbContext(typeof(CatalogDbContext))]
|
|
partial class CatalogDbContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "10.0.2")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.HasPostgresExtension(modelBuilder, "postgis");
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("Nashel.Modules.Catalog.Domain.Aggregates.Category", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<JsonDocument>("AttributeSchema")
|
|
.HasColumnType("jsonb");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<Guid?>("ParentId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Slug")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ParentId");
|
|
|
|
b.HasIndex("Slug")
|
|
.IsUnique();
|
|
|
|
b.ToTable("Categories", "catalog");
|
|
});
|
|
|
|
modelBuilder.Entity("Nashel.Modules.Catalog.Domain.Aggregates.Offer", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<JsonDocument>("Attributes")
|
|
.HasColumnType("jsonb");
|
|
|
|
b.Property<Guid>("CategoryId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTimeOffset>("CreatedAt")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Description")
|
|
.HasColumnType("text");
|
|
|
|
b.PrimitiveCollection<List<string>>("Images")
|
|
.IsRequired()
|
|
.HasColumnType("text[]");
|
|
|
|
b.Property<bool>("IsActive")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<Guid>("PerformerId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("Attributes");
|
|
|
|
NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex("Attributes"), "gin");
|
|
|
|
b.ToTable("Offers", "catalog");
|
|
});
|
|
|
|
modelBuilder.Entity("Nashel.Modules.Catalog.Domain.Aggregates.Category", b =>
|
|
{
|
|
b.HasOne("Nashel.Modules.Catalog.Domain.Aggregates.Category", null)
|
|
.WithMany()
|
|
.HasForeignKey("ParentId")
|
|
.OnDelete(DeleteBehavior.Restrict);
|
|
});
|
|
|
|
modelBuilder.Entity("Nashel.Modules.Catalog.Domain.Aggregates.Offer", b =>
|
|
{
|
|
b.OwnsOne("Nashel.Modules.Catalog.Domain.ValueObjects.Price", "Price", b1 =>
|
|
{
|
|
b1.Property<Guid>("OfferId")
|
|
.HasColumnType("uuid");
|
|
|
|
b1.Property<decimal>("Amount")
|
|
.HasColumnType("numeric")
|
|
.HasColumnName("PriceAmount");
|
|
|
|
b1.Property<string>("Currency")
|
|
.IsRequired()
|
|
.HasMaxLength(3)
|
|
.HasColumnType("character varying(3)")
|
|
.HasColumnName("PriceCurrency");
|
|
|
|
b1.Property<int>("Type")
|
|
.HasColumnType("integer")
|
|
.HasColumnName("PriceType");
|
|
|
|
b1.HasKey("OfferId");
|
|
|
|
b1.ToTable("Offers", "catalog");
|
|
|
|
b1.WithOwner()
|
|
.HasForeignKey("OfferId");
|
|
});
|
|
|
|
b.Navigation("Price")
|
|
.IsRequired();
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|