417 lines
14 KiB
C#
417 lines
14 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using LiteCharms.Infrastructure.Database;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
|
|
#nullable disable
|
|
|
|
namespace LiteCharms.Infrastructure.Database.Migrations
|
|
{
|
|
[DbContext(typeof(ShopDbContext))]
|
|
[Migration("20260505124135_AddedProcessedColumnToNotifications")]
|
|
partial class AddedProcessedColumnToNotifications
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "10.0.7")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
|
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("LiteCharms.Entities.Customer", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<bool>("Active")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("boolean")
|
|
.HasDefaultValue(true);
|
|
|
|
b.Property<string>("Address")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("City")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Company")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Country")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTimeOffset>("CreatedAt")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Discord")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Email")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("LastName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("LinkedIn")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Phone")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("PostalCode")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Region")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Slack")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Tax")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTimeOffset?>("UpdatedAt")
|
|
.ValueGeneratedOnUpdate()
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Website")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Whatsapp")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Customer", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("LiteCharms.Entities.Lead", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<long?>("AdGroupId")
|
|
.HasColumnType("bigint");
|
|
|
|
b.Property<long?>("AdName")
|
|
.HasColumnType("bigint");
|
|
|
|
b.Property<string>("AppClickId")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("AttributionHash")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<long?>("CampaignId")
|
|
.HasColumnType("bigint");
|
|
|
|
b.Property<string>("ClickId")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("ClickLocation")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTimeOffset>("CreatedAt")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid?>("CustomerId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<long?>("FeedItemId")
|
|
.HasColumnType("bigint");
|
|
|
|
b.Property<string>("Source")
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<long?>("TargetId")
|
|
.HasColumnType("bigint");
|
|
|
|
b.Property<DateTimeOffset?>("UpdatedAt")
|
|
.ValueGeneratedOnUpdate()
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("WebClickId")
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CustomerId");
|
|
|
|
b.ToTable("Lead", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("LiteCharms.Entities.Notification", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Author")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("CorrelationId")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("CorrelationIdType")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<DateTimeOffset>("CreatedAt")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("Direction")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<bool>("IsInternal")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("boolean")
|
|
.HasDefaultValue(true);
|
|
|
|
b.Property<string>("Platform")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("PlatformAddress")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<bool>("Processed")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("boolean")
|
|
.HasDefaultValue(false);
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Notification", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("LiteCharms.Entities.Order", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTimeOffset>("CreatedAt")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("CustomerId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.PrimitiveCollection<string>("Notes")
|
|
.HasColumnType("jsonb");
|
|
|
|
b.Property<Guid>("ProductPriceId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<Guid?>("RefundId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<int>("Status")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<DateTimeOffset?>("UpdatedAt")
|
|
.ValueGeneratedOnUpdate()
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CustomerId");
|
|
|
|
b.HasIndex("ProductPriceId");
|
|
|
|
b.ToTable("Order", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("LiteCharms.Entities.OrderRefund", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<decimal>("Amount")
|
|
.HasPrecision(18, 2)
|
|
.HasColumnType("numeric(18,2)");
|
|
|
|
b.Property<DateTimeOffset>("CreatedAt")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<Guid>("OrderId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<string>("Reason")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("OrderId")
|
|
.IsUnique();
|
|
|
|
b.ToTable("OrderRefund", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("LiteCharms.Entities.Product", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<bool>("Active")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("boolean")
|
|
.HasDefaultValue(true);
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Product", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("LiteCharms.Entities.ProductPrice", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<bool>("Active")
|
|
.HasColumnType("boolean");
|
|
|
|
b.Property<DateTimeOffset>("CreatedAt")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<decimal>("Discount")
|
|
.HasPrecision(18, 2)
|
|
.HasColumnType("numeric(18,2)");
|
|
|
|
b.Property<decimal>("Price")
|
|
.HasPrecision(18, 2)
|
|
.HasColumnType("numeric(18,2)");
|
|
|
|
b.Property<Guid>("ProductId")
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<DateTimeOffset?>("UpdatedAt")
|
|
.ValueGeneratedOnUpdate()
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ProductId");
|
|
|
|
b.ToTable("ProductPrice", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("LiteCharms.Entities.Lead", b =>
|
|
{
|
|
b.HasOne("LiteCharms.Entities.Customer", "Customer")
|
|
.WithMany("Leads")
|
|
.HasForeignKey("CustomerId")
|
|
.OnDelete(DeleteBehavior.NoAction);
|
|
|
|
b.Navigation("Customer");
|
|
});
|
|
|
|
modelBuilder.Entity("LiteCharms.Entities.Order", b =>
|
|
{
|
|
b.HasOne("LiteCharms.Entities.Customer", "Customer")
|
|
.WithMany("Orders")
|
|
.HasForeignKey("CustomerId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("LiteCharms.Entities.ProductPrice", "ProductPrice")
|
|
.WithMany()
|
|
.HasForeignKey("ProductPriceId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Customer");
|
|
|
|
b.Navigation("ProductPrice");
|
|
});
|
|
|
|
modelBuilder.Entity("LiteCharms.Entities.OrderRefund", b =>
|
|
{
|
|
b.HasOne("LiteCharms.Entities.Order", "Order")
|
|
.WithOne("Refund")
|
|
.HasForeignKey("LiteCharms.Entities.OrderRefund", "OrderId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Order");
|
|
});
|
|
|
|
modelBuilder.Entity("LiteCharms.Entities.ProductPrice", b =>
|
|
{
|
|
b.HasOne("LiteCharms.Entities.Product", "Product")
|
|
.WithMany("ProductPrices")
|
|
.HasForeignKey("ProductId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Product");
|
|
});
|
|
|
|
modelBuilder.Entity("LiteCharms.Entities.Customer", b =>
|
|
{
|
|
b.Navigation("Leads");
|
|
|
|
b.Navigation("Orders");
|
|
});
|
|
|
|
modelBuilder.Entity("LiteCharms.Entities.Order", b =>
|
|
{
|
|
b.Navigation("Refund");
|
|
});
|
|
|
|
modelBuilder.Entity("LiteCharms.Entities.Product", b =>
|
|
{
|
|
b.Navigation("ProductPrices");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|