2049 lines
69 KiB
C#
2049 lines
69 KiB
C#
|
|
// <auto-generated />
|
||
|
|
using System;
|
||
|
|
using Meezi.Infrastructure.Data;
|
||
|
|
using Microsoft.EntityFrameworkCore;
|
||
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||
|
|
|
||
|
|
#nullable disable
|
||
|
|
|
||
|
|
namespace Meezi.Infrastructure.Data.Migrations
|
||
|
|
{
|
||
|
|
[DbContext(typeof(AppDbContext))]
|
||
|
|
[Migration("20260522111039_AddCafeThemeJson")]
|
||
|
|
partial class AddCafeThemeJson
|
||
|
|
{
|
||
|
|
/// <inheritdoc />
|
||
|
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||
|
|
{
|
||
|
|
#pragma warning disable 612, 618
|
||
|
|
modelBuilder
|
||
|
|
.HasAnnotation("ProductVersion", "10.0.0")
|
||
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||
|
|
|
||
|
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Attendance", b =>
|
||
|
|
{
|
||
|
|
b.Property<string>("Id")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("ClockIn")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("ClockOut")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<DateTime>("CreatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<DateOnly>("Date")
|
||
|
|
.HasColumnType("date");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("DeletedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<string>("EmployeeId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("Notes")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.HasKey("Id");
|
||
|
|
|
||
|
|
b.HasIndex("EmployeeId", "Date")
|
||
|
|
.IsUnique();
|
||
|
|
|
||
|
|
b.ToTable("Attendances");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Branch", b =>
|
||
|
|
{
|
||
|
|
b.Property<string>("Id")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("Address")
|
||
|
|
.HasMaxLength(500)
|
||
|
|
.HasColumnType("character varying(500)");
|
||
|
|
|
||
|
|
b.Property<bool>("AutoCutEnabled")
|
||
|
|
.HasColumnType("boolean");
|
||
|
|
|
||
|
|
b.Property<string>("CafeId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("City")
|
||
|
|
.HasMaxLength(100)
|
||
|
|
.HasColumnType("character varying(100)");
|
||
|
|
|
||
|
|
b.Property<DateTime>("CreatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("DeletedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<bool>("IsActive")
|
||
|
|
.HasColumnType("boolean");
|
||
|
|
|
||
|
|
b.Property<string>("KitchenPrinterIp")
|
||
|
|
.HasMaxLength(45)
|
||
|
|
.HasColumnType("character varying(45)");
|
||
|
|
|
||
|
|
b.Property<int?>("KitchenPrinterPort")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.Property<string>("Name")
|
||
|
|
.IsRequired()
|
||
|
|
.HasMaxLength(200)
|
||
|
|
.HasColumnType("character varying(200)");
|
||
|
|
|
||
|
|
b.Property<int>("PaperWidthMm")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.Property<string>("Phone")
|
||
|
|
.HasMaxLength(20)
|
||
|
|
.HasColumnType("character varying(20)");
|
||
|
|
|
||
|
|
b.Property<string>("PosDeviceIp")
|
||
|
|
.HasMaxLength(45)
|
||
|
|
.HasColumnType("character varying(45)");
|
||
|
|
|
||
|
|
b.Property<int?>("PosDevicePort")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.Property<string>("ReceiptFooter")
|
||
|
|
.HasMaxLength(500)
|
||
|
|
.HasColumnType("character varying(500)");
|
||
|
|
|
||
|
|
b.Property<string>("ReceiptHeader")
|
||
|
|
.HasMaxLength(500)
|
||
|
|
.HasColumnType("character varying(500)");
|
||
|
|
|
||
|
|
b.Property<string>("ReceiptPrinterIp")
|
||
|
|
.HasMaxLength(45)
|
||
|
|
.HasColumnType("character varying(45)");
|
||
|
|
|
||
|
|
b.Property<int?>("ReceiptPrinterPort")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.Property<DateTime>("UpdatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<string>("WifiPassword")
|
||
|
|
.HasMaxLength(100)
|
||
|
|
.HasColumnType("character varying(100)");
|
||
|
|
|
||
|
|
b.HasKey("Id");
|
||
|
|
|
||
|
|
b.HasIndex("CafeId", "IsActive");
|
||
|
|
|
||
|
|
b.ToTable("Branches");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.BranchMenuItemOverride", b =>
|
||
|
|
{
|
||
|
|
b.Property<string>("Id")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("BranchId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("CafeId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateTime>("CreatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("DeletedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<bool>("IsAvailable")
|
||
|
|
.HasColumnType("boolean");
|
||
|
|
|
||
|
|
b.Property<string>("MenuItemId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<decimal?>("PriceOverride")
|
||
|
|
.HasPrecision(18, 2)
|
||
|
|
.HasColumnType("numeric(18,2)");
|
||
|
|
|
||
|
|
b.Property<int?>("SortOrderOverride")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.Property<DateTime>("UpdatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<string>("UpdatedByUserId")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.HasKey("Id");
|
||
|
|
|
||
|
|
b.HasIndex("CafeId");
|
||
|
|
|
||
|
|
b.HasIndex("MenuItemId");
|
||
|
|
|
||
|
|
b.HasIndex("BranchId", "MenuItemId")
|
||
|
|
.IsUnique();
|
||
|
|
|
||
|
|
b.ToTable("BranchMenuItemOverrides");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Cafe", b =>
|
||
|
|
{
|
||
|
|
b.Property<string>("Id")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("Address")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("City")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("CoverImageUrl")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateTime>("CreatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("DeletedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<string>("Description")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<bool>("IsVerified")
|
||
|
|
.HasColumnType("boolean");
|
||
|
|
|
||
|
|
b.Property<string>("LogoUrl")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("Name")
|
||
|
|
.IsRequired()
|
||
|
|
.HasMaxLength(200)
|
||
|
|
.HasColumnType("character varying(200)");
|
||
|
|
|
||
|
|
b.Property<string>("NameAr")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("NameEn")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("Phone")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("PlanExpiresAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<int>("PlanTier")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.Property<string>("PreferredLanguage")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("Slug")
|
||
|
|
.IsRequired()
|
||
|
|
.HasMaxLength(100)
|
||
|
|
.HasColumnType("character varying(100)");
|
||
|
|
|
||
|
|
b.Property<string>("SnappfoodVendorId")
|
||
|
|
.HasMaxLength(100)
|
||
|
|
.HasColumnType("character varying(100)");
|
||
|
|
|
||
|
|
b.Property<string>("ThemeJson")
|
||
|
|
.HasMaxLength(8000)
|
||
|
|
.HasColumnType("character varying(8000)");
|
||
|
|
|
||
|
|
b.HasKey("Id");
|
||
|
|
|
||
|
|
b.HasIndex("Slug")
|
||
|
|
.IsUnique();
|
||
|
|
|
||
|
|
b.ToTable("Cafes");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.CafeReview", b =>
|
||
|
|
{
|
||
|
|
b.Property<string>("Id")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("AuthorName")
|
||
|
|
.IsRequired()
|
||
|
|
.HasMaxLength(200)
|
||
|
|
.HasColumnType("character varying(200)");
|
||
|
|
|
||
|
|
b.Property<string>("AuthorPhone")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("CafeId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("Comment")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateTime>("CreatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("DeletedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("OwnerRepliedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<string>("OwnerReply")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<int>("Rating")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.HasKey("Id");
|
||
|
|
|
||
|
|
b.HasIndex("CafeId", "CreatedAt");
|
||
|
|
|
||
|
|
b.ToTable("CafeReviews");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.CashTransaction", b =>
|
||
|
|
{
|
||
|
|
b.Property<string>("Id")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<decimal>("Amount")
|
||
|
|
.HasPrecision(18, 2)
|
||
|
|
.HasColumnType("numeric(18,2)");
|
||
|
|
|
||
|
|
b.Property<string>("BranchId")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("CafeId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateTime>("CreatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<string>("CreatedByUserId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("DeletedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<int>("Method")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.Property<string>("Note")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("ReferenceId")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("ShiftId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<int>("Type")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.HasKey("Id");
|
||
|
|
|
||
|
|
b.HasIndex("BranchId");
|
||
|
|
|
||
|
|
b.HasIndex("ShiftId");
|
||
|
|
|
||
|
|
b.HasIndex("CafeId", "BranchId");
|
||
|
|
|
||
|
|
b.ToTable("CashTransactions");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Coupon", b =>
|
||
|
|
{
|
||
|
|
b.Property<string>("Id")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("CafeId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("Code")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateTime>("CreatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("DeletedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("ExpiresAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<bool>("IsActive")
|
||
|
|
.HasColumnType("boolean");
|
||
|
|
|
||
|
|
b.Property<decimal?>("MaxDiscount")
|
||
|
|
.HasColumnType("numeric");
|
||
|
|
|
||
|
|
b.Property<decimal?>("MinOrderAmount")
|
||
|
|
.HasColumnType("numeric");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("StartsAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<int?>("TargetGroup")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.Property<int>("Type")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.Property<int?>("UsageLimit")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.Property<int>("UsedCount")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.Property<decimal>("Value")
|
||
|
|
.HasPrecision(18, 2)
|
||
|
|
.HasColumnType("numeric(18,2)");
|
||
|
|
|
||
|
|
b.HasKey("Id");
|
||
|
|
|
||
|
|
b.HasIndex("CafeId", "Code")
|
||
|
|
.IsUnique();
|
||
|
|
|
||
|
|
b.ToTable("Coupons");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Customer", b =>
|
||
|
|
{
|
||
|
|
b.Property<string>("Id")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("BirthDateJalali")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("CafeId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateTime>("CreatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("DeletedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<int>("Group")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.Property<int>("LoyaltyPoints")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.Property<string>("Name")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("NationalId")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("Phone")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("ReferredBy")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.HasKey("Id");
|
||
|
|
|
||
|
|
b.HasIndex("CafeId", "Phone");
|
||
|
|
|
||
|
|
b.ToTable("Customers");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.DailyReport", b =>
|
||
|
|
{
|
||
|
|
b.Property<string>("Id")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<decimal>("AvgOrderValue")
|
||
|
|
.HasPrecision(18, 2)
|
||
|
|
.HasColumnType("numeric(18,2)");
|
||
|
|
|
||
|
|
b.Property<string>("BranchId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("CafeId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<decimal>("CardRevenue")
|
||
|
|
.HasPrecision(18, 2)
|
||
|
|
.HasColumnType("numeric(18,2)");
|
||
|
|
|
||
|
|
b.Property<decimal>("CashRevenue")
|
||
|
|
.HasPrecision(18, 2)
|
||
|
|
.HasColumnType("numeric(18,2)");
|
||
|
|
|
||
|
|
b.Property<DateTime>("CreatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<decimal>("CreditRevenue")
|
||
|
|
.HasPrecision(18, 2)
|
||
|
|
.HasColumnType("numeric(18,2)");
|
||
|
|
|
||
|
|
b.Property<DateOnly>("Date")
|
||
|
|
.HasColumnType("date");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("DeletedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<DateTime>("GeneratedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<decimal>("NetIncome")
|
||
|
|
.HasPrecision(18, 2)
|
||
|
|
.HasColumnType("numeric(18,2)");
|
||
|
|
|
||
|
|
b.Property<string>("TopProducts")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("jsonb");
|
||
|
|
|
||
|
|
b.Property<decimal>("TotalExpenses")
|
||
|
|
.HasPrecision(18, 2)
|
||
|
|
.HasColumnType("numeric(18,2)");
|
||
|
|
|
||
|
|
b.Property<int>("TotalOrders")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.Property<decimal>("TotalRevenue")
|
||
|
|
.HasPrecision(18, 2)
|
||
|
|
.HasColumnType("numeric(18,2)");
|
||
|
|
|
||
|
|
b.Property<int>("TotalVoids")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.Property<decimal>("VoidAmount")
|
||
|
|
.HasPrecision(18, 2)
|
||
|
|
.HasColumnType("numeric(18,2)");
|
||
|
|
|
||
|
|
b.HasKey("Id");
|
||
|
|
|
||
|
|
b.HasIndex("BranchId");
|
||
|
|
|
||
|
|
b.HasIndex("CafeId", "BranchId", "Date")
|
||
|
|
.IsUnique();
|
||
|
|
|
||
|
|
b.ToTable("DailyReports");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Employee", b =>
|
||
|
|
{
|
||
|
|
b.Property<string>("Id")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<decimal>("BaseSalary")
|
||
|
|
.HasColumnType("numeric");
|
||
|
|
|
||
|
|
b.Property<string>("BranchId")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("CafeId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateTime>("CreatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("DeletedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<string>("Name")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("NationalId")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("Phone")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("PinCode")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<int>("Role")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.HasKey("Id");
|
||
|
|
|
||
|
|
b.HasIndex("BranchId");
|
||
|
|
|
||
|
|
b.HasIndex("CafeId", "Phone");
|
||
|
|
|
||
|
|
b.ToTable("Employees");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.EmployeeSalary", b =>
|
||
|
|
{
|
||
|
|
b.Property<string>("Id")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<decimal>("BaseSalary")
|
||
|
|
.HasColumnType("numeric");
|
||
|
|
|
||
|
|
b.Property<DateTime>("CreatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<decimal>("Deductions")
|
||
|
|
.HasColumnType("numeric");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("DeletedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<string>("EmployeeId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<bool>("IsPaid")
|
||
|
|
.HasColumnType("boolean");
|
||
|
|
|
||
|
|
b.Property<string>("MonthYear")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<decimal>("NetSalary")
|
||
|
|
.HasColumnType("numeric");
|
||
|
|
|
||
|
|
b.Property<decimal>("OvertimePay")
|
||
|
|
.HasColumnType("numeric");
|
||
|
|
|
||
|
|
b.HasKey("Id");
|
||
|
|
|
||
|
|
b.HasIndex("EmployeeId", "MonthYear")
|
||
|
|
.IsUnique();
|
||
|
|
|
||
|
|
b.ToTable("EmployeeSalaries");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.EmployeeSchedule", b =>
|
||
|
|
{
|
||
|
|
b.Property<string>("Id")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateTime>("CreatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<int>("DayOfWeek")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("DeletedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<string>("EmployeeId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<int>("ShiftType")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.HasKey("Id");
|
||
|
|
|
||
|
|
b.HasIndex("EmployeeId", "DayOfWeek")
|
||
|
|
.IsUnique();
|
||
|
|
|
||
|
|
b.ToTable("EmployeeSchedules", (string)null);
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Expense", b =>
|
||
|
|
{
|
||
|
|
b.Property<string>("Id")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<decimal>("Amount")
|
||
|
|
.HasPrecision(18, 2)
|
||
|
|
.HasColumnType("numeric(18,2)");
|
||
|
|
|
||
|
|
b.Property<string>("BranchId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("CafeId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<int>("Category")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.Property<DateTime>("CreatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<string>("CreatedByUserId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("DeletedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<string>("Note")
|
||
|
|
.HasMaxLength(500)
|
||
|
|
.HasColumnType("character varying(500)");
|
||
|
|
|
||
|
|
b.Property<string>("ReceiptImageUrl")
|
||
|
|
.HasMaxLength(500)
|
||
|
|
.HasColumnType("character varying(500)");
|
||
|
|
|
||
|
|
b.Property<string>("ShiftId")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.HasKey("Id");
|
||
|
|
|
||
|
|
b.HasIndex("BranchId");
|
||
|
|
|
||
|
|
b.HasIndex("ShiftId");
|
||
|
|
|
||
|
|
b.HasIndex("CafeId", "BranchId", "CreatedAt");
|
||
|
|
|
||
|
|
b.ToTable("Expenses");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Ingredient", b =>
|
||
|
|
{
|
||
|
|
b.Property<string>("Id")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("CafeId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateTime>("CreatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("DeletedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<string>("Name")
|
||
|
|
.IsRequired()
|
||
|
|
.HasMaxLength(200)
|
||
|
|
.HasColumnType("character varying(200)");
|
||
|
|
|
||
|
|
b.Property<decimal>("QuantityOnHand")
|
||
|
|
.HasPrecision(18, 3)
|
||
|
|
.HasColumnType("numeric(18,3)");
|
||
|
|
|
||
|
|
b.Property<decimal>("ReorderLevel")
|
||
|
|
.HasPrecision(18, 3)
|
||
|
|
.HasColumnType("numeric(18,3)");
|
||
|
|
|
||
|
|
b.Property<string>("Unit")
|
||
|
|
.IsRequired()
|
||
|
|
.HasMaxLength(50)
|
||
|
|
.HasColumnType("character varying(50)");
|
||
|
|
|
||
|
|
b.HasKey("Id");
|
||
|
|
|
||
|
|
b.HasIndex("CafeId");
|
||
|
|
|
||
|
|
b.ToTable("Ingredients");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.LeaveRequest", b =>
|
||
|
|
{
|
||
|
|
b.Property<string>("Id")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateTime>("CreatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("DeletedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<string>("EmployeeId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateOnly>("EndDate")
|
||
|
|
.HasColumnType("date");
|
||
|
|
|
||
|
|
b.Property<string>("Reason")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("ReviewedBy")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateOnly>("StartDate")
|
||
|
|
.HasColumnType("date");
|
||
|
|
|
||
|
|
b.Property<int>("Status")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.HasKey("Id");
|
||
|
|
|
||
|
|
b.HasIndex("EmployeeId");
|
||
|
|
|
||
|
|
b.ToTable("LeaveRequests");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.MenuCategory", b =>
|
||
|
|
{
|
||
|
|
b.Property<string>("Id")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("CafeId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateTime>("CreatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("DeletedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<decimal>("DiscountPercent")
|
||
|
|
.HasColumnType("numeric");
|
||
|
|
|
||
|
|
b.Property<string>("Icon")
|
||
|
|
.HasMaxLength(32)
|
||
|
|
.HasColumnType("character varying(32)");
|
||
|
|
|
||
|
|
b.Property<string>("IconPresetId")
|
||
|
|
.HasMaxLength(48)
|
||
|
|
.HasColumnType("character varying(48)");
|
||
|
|
|
||
|
|
b.Property<string>("IconStyle")
|
||
|
|
.HasMaxLength(16)
|
||
|
|
.HasColumnType("character varying(16)");
|
||
|
|
|
||
|
|
b.Property<string>("ImageUrl")
|
||
|
|
.HasMaxLength(500)
|
||
|
|
.HasColumnType("character varying(500)");
|
||
|
|
|
||
|
|
b.Property<bool>("IsActive")
|
||
|
|
.HasColumnType("boolean");
|
||
|
|
|
||
|
|
b.Property<string>("Name")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("NameAr")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("NameEn")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<int>("SortOrder")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.Property<string>("TaxId")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.HasKey("Id");
|
||
|
|
|
||
|
|
b.HasIndex("CafeId");
|
||
|
|
|
||
|
|
b.HasIndex("TaxId");
|
||
|
|
|
||
|
|
b.ToTable("MenuCategories");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.MenuItem", b =>
|
||
|
|
{
|
||
|
|
b.Property<string>("Id")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("CafeId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("CategoryId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateTime>("CreatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("DeletedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<string>("Description")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<decimal>("DiscountPercent")
|
||
|
|
.HasColumnType("numeric");
|
||
|
|
|
||
|
|
b.Property<string>("ImageUrl")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<bool>("IsAvailable")
|
||
|
|
.HasColumnType("boolean");
|
||
|
|
|
||
|
|
b.Property<string>("Name")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("NameAr")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("NameEn")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<decimal>("Price")
|
||
|
|
.HasPrecision(18, 2)
|
||
|
|
.HasColumnType("numeric(18,2)");
|
||
|
|
|
||
|
|
b.Property<string>("VideoUrl")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.HasKey("Id");
|
||
|
|
|
||
|
|
b.HasIndex("CafeId");
|
||
|
|
|
||
|
|
b.HasIndex("CategoryId");
|
||
|
|
|
||
|
|
b.ToTable("MenuItems");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Order", b =>
|
||
|
|
{
|
||
|
|
b.Property<string>("Id")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("BranchId")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("CafeId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("CouponId")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateTime>("CreatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<string>("CustomerId")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("DeletedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<decimal>("DiscountAmount")
|
||
|
|
.HasPrecision(18, 2)
|
||
|
|
.HasColumnType("numeric(18,2)");
|
||
|
|
|
||
|
|
b.Property<string>("EmployeeId")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("GuestName")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("GuestPhone")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<int>("OrderType")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.Property<string>("ReservationId")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("SnappfoodOrderId")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<int>("Status")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.Property<decimal>("Subtotal")
|
||
|
|
.HasPrecision(18, 2)
|
||
|
|
.HasColumnType("numeric(18,2)");
|
||
|
|
|
||
|
|
b.Property<string>("TableId")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<decimal>("TaxTotal")
|
||
|
|
.HasPrecision(18, 2)
|
||
|
|
.HasColumnType("numeric(18,2)");
|
||
|
|
|
||
|
|
b.Property<decimal>("Total")
|
||
|
|
.HasPrecision(18, 2)
|
||
|
|
.HasColumnType("numeric(18,2)");
|
||
|
|
|
||
|
|
b.HasKey("Id");
|
||
|
|
|
||
|
|
b.HasIndex("BranchId");
|
||
|
|
|
||
|
|
b.HasIndex("CafeId");
|
||
|
|
|
||
|
|
b.HasIndex("CouponId");
|
||
|
|
|
||
|
|
b.HasIndex("CustomerId");
|
||
|
|
|
||
|
|
b.HasIndex("EmployeeId");
|
||
|
|
|
||
|
|
b.HasIndex("ReservationId");
|
||
|
|
|
||
|
|
b.HasIndex("TableId");
|
||
|
|
|
||
|
|
b.ToTable("Orders");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.OrderItem", b =>
|
||
|
|
{
|
||
|
|
b.Property<string>("Id")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateTime>("CreatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("DeletedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<bool>("IsVoided")
|
||
|
|
.HasColumnType("boolean");
|
||
|
|
|
||
|
|
b.Property<string>("MenuItemId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("Notes")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("OrderId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<int>("Quantity")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.Property<decimal>("UnitPrice")
|
||
|
|
.HasPrecision(18, 2)
|
||
|
|
.HasColumnType("numeric(18,2)");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("VoidedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<string>("VoidedByUserId")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.HasKey("Id");
|
||
|
|
|
||
|
|
b.HasIndex("MenuItemId");
|
||
|
|
|
||
|
|
b.HasIndex("OrderId");
|
||
|
|
|
||
|
|
b.ToTable("OrderItems");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Payment", b =>
|
||
|
|
{
|
||
|
|
b.Property<string>("Id")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<decimal>("Amount")
|
||
|
|
.HasPrecision(18, 2)
|
||
|
|
.HasColumnType("numeric(18,2)");
|
||
|
|
|
||
|
|
b.Property<DateTime>("CreatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("DeletedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<int>("Method")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.Property<string>("OrderId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("Reference")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<int>("Status")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.HasKey("Id");
|
||
|
|
|
||
|
|
b.HasIndex("OrderId");
|
||
|
|
|
||
|
|
b.ToTable("Payments");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.QueueTicket", b =>
|
||
|
|
{
|
||
|
|
b.Property<string>("Id")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("BranchId")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("CafeId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateTime>("CreatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<string>("CustomerLabel")
|
||
|
|
.HasMaxLength(200)
|
||
|
|
.HasColumnType("character varying(200)");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("DeletedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<DateTime>("IssuedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<string>("IssuedByUserId")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<int>("Number")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.Property<string>("OrderId")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateOnly>("ServiceDate")
|
||
|
|
.HasColumnType("date");
|
||
|
|
|
||
|
|
b.Property<int>("Status")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.HasKey("Id");
|
||
|
|
|
||
|
|
b.HasIndex("BranchId");
|
||
|
|
|
||
|
|
b.HasIndex("OrderId");
|
||
|
|
|
||
|
|
b.HasIndex("CafeId", "BranchId", "ServiceDate", "Number")
|
||
|
|
.IsUnique();
|
||
|
|
|
||
|
|
b.ToTable("QueueTickets");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Shift", b =>
|
||
|
|
{
|
||
|
|
b.Property<string>("Id")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("BranchId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("CafeId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("ClosedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<string>("ClosedByUserId")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<decimal?>("ClosingCash")
|
||
|
|
.HasPrecision(18, 2)
|
||
|
|
.HasColumnType("numeric(18,2)");
|
||
|
|
|
||
|
|
b.Property<DateTime>("CreatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("DeletedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<decimal?>("Discrepancy")
|
||
|
|
.HasPrecision(18, 2)
|
||
|
|
.HasColumnType("numeric(18,2)");
|
||
|
|
|
||
|
|
b.Property<decimal>("ExpectedCash")
|
||
|
|
.HasPrecision(18, 2)
|
||
|
|
.HasColumnType("numeric(18,2)");
|
||
|
|
|
||
|
|
b.Property<DateTime>("OpenedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<string>("OpenedByUserId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<decimal>("OpeningCash")
|
||
|
|
.HasPrecision(18, 2)
|
||
|
|
.HasColumnType("numeric(18,2)");
|
||
|
|
|
||
|
|
b.Property<int>("Status")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.HasKey("Id");
|
||
|
|
|
||
|
|
b.HasIndex("CafeId");
|
||
|
|
|
||
|
|
b.HasIndex("ClosedByUserId");
|
||
|
|
|
||
|
|
b.HasIndex("OpenedByUserId");
|
||
|
|
|
||
|
|
b.HasIndex("BranchId", "Status");
|
||
|
|
|
||
|
|
b.ToTable("RegisterShifts", (string)null);
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.StockMovement", b =>
|
||
|
|
{
|
||
|
|
b.Property<string>("Id")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("CafeId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateTime>("CreatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("DeletedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<decimal>("Delta")
|
||
|
|
.HasPrecision(18, 3)
|
||
|
|
.HasColumnType("numeric(18,3)");
|
||
|
|
|
||
|
|
b.Property<string>("IngredientId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("Note")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.HasKey("Id");
|
||
|
|
|
||
|
|
b.HasIndex("CafeId");
|
||
|
|
|
||
|
|
b.HasIndex("IngredientId");
|
||
|
|
|
||
|
|
b.ToTable("StockMovements");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.SubscriptionPayment", b =>
|
||
|
|
{
|
||
|
|
b.Property<string>("Id")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<long>("AmountRials")
|
||
|
|
.HasColumnType("bigint");
|
||
|
|
|
||
|
|
b.Property<decimal>("AmountToman")
|
||
|
|
.HasPrecision(18, 2)
|
||
|
|
.HasColumnType("numeric(18,2)");
|
||
|
|
|
||
|
|
b.Property<string>("Authority")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("CafeId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateTime>("CreatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("DeletedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<int>("Months")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.Property<int>("PlanTier")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.Property<string>("RefId")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<int>("Status")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.HasKey("Id");
|
||
|
|
|
||
|
|
b.HasIndex("Authority");
|
||
|
|
|
||
|
|
b.HasIndex("CafeId");
|
||
|
|
|
||
|
|
b.ToTable("SubscriptionPayments");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Table", b =>
|
||
|
|
{
|
||
|
|
b.Property<string>("Id")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("BranchId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("CafeId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<int>("Capacity")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.Property<DateTime>("CreatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("DeletedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<string>("Floor")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("ImageUrl")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<bool>("IsActive")
|
||
|
|
.HasColumnType("boolean");
|
||
|
|
|
||
|
|
b.Property<bool>("IsCleaning")
|
||
|
|
.HasColumnType("boolean");
|
||
|
|
|
||
|
|
b.Property<string>("Number")
|
||
|
|
.IsRequired()
|
||
|
|
.HasMaxLength(50)
|
||
|
|
.HasColumnType("character varying(50)");
|
||
|
|
|
||
|
|
b.Property<string>("QrCode")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("SectionId")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<int>("SortOrder")
|
||
|
|
.ValueGeneratedOnAdd()
|
||
|
|
.HasColumnType("integer")
|
||
|
|
.HasDefaultValue(0);
|
||
|
|
|
||
|
|
b.Property<string>("VideoUrl")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.HasKey("Id");
|
||
|
|
|
||
|
|
b.HasIndex("CafeId");
|
||
|
|
|
||
|
|
b.HasIndex("QrCode")
|
||
|
|
.IsUnique();
|
||
|
|
|
||
|
|
b.HasIndex("SectionId");
|
||
|
|
|
||
|
|
b.HasIndex("BranchId", "SectionId", "SortOrder");
|
||
|
|
|
||
|
|
b.ToTable("Tables");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.TableReservation", b =>
|
||
|
|
{
|
||
|
|
b.Property<string>("Id")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("CafeId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateTime>("CreatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<string>("CustomerId")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateOnly>("Date")
|
||
|
|
.HasColumnType("date");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("DeletedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<string>("GuestName")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("GuestPhone")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("Notes")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<int>("PartySize")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.Property<int>("Status")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.Property<string>("TableId")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<TimeOnly>("Time")
|
||
|
|
.HasColumnType("time without time zone");
|
||
|
|
|
||
|
|
b.HasKey("Id");
|
||
|
|
|
||
|
|
b.HasIndex("CustomerId");
|
||
|
|
|
||
|
|
b.HasIndex("TableId");
|
||
|
|
|
||
|
|
b.HasIndex("CafeId", "Date", "Time");
|
||
|
|
|
||
|
|
b.ToTable("TableReservations");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.TableSection", b =>
|
||
|
|
{
|
||
|
|
b.Property<string>("Id")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("BranchId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("CafeId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateTime>("CreatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("DeletedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<bool>("IsActive")
|
||
|
|
.HasColumnType("boolean");
|
||
|
|
|
||
|
|
b.Property<string>("Name")
|
||
|
|
.IsRequired()
|
||
|
|
.HasMaxLength(100)
|
||
|
|
.HasColumnType("character varying(100)");
|
||
|
|
|
||
|
|
b.Property<int>("SortOrder")
|
||
|
|
.HasColumnType("integer");
|
||
|
|
|
||
|
|
b.HasKey("Id");
|
||
|
|
|
||
|
|
b.HasIndex("CafeId");
|
||
|
|
|
||
|
|
b.HasIndex("BranchId", "Name");
|
||
|
|
|
||
|
|
b.ToTable("TableSections");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Tax", b =>
|
||
|
|
{
|
||
|
|
b.Property<string>("Id")
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<string>("CafeId")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<DateTime>("CreatedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<DateTime?>("DeletedAt")
|
||
|
|
.HasColumnType("timestamp with time zone");
|
||
|
|
|
||
|
|
b.Property<bool>("IsCompound")
|
||
|
|
.HasColumnType("boolean");
|
||
|
|
|
||
|
|
b.Property<bool>("IsDefault")
|
||
|
|
.HasColumnType("boolean");
|
||
|
|
|
||
|
|
b.Property<bool>("IsRequired")
|
||
|
|
.HasColumnType("boolean");
|
||
|
|
|
||
|
|
b.Property<string>("Name")
|
||
|
|
.IsRequired()
|
||
|
|
.HasColumnType("text");
|
||
|
|
|
||
|
|
b.Property<decimal>("Rate")
|
||
|
|
.HasPrecision(5, 2)
|
||
|
|
.HasColumnType("numeric(5,2)");
|
||
|
|
|
||
|
|
b.HasKey("Id");
|
||
|
|
|
||
|
|
b.HasIndex("CafeId");
|
||
|
|
|
||
|
|
b.ToTable("Taxes");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Attendance", b =>
|
||
|
|
{
|
||
|
|
b.HasOne("Meezi.Core.Entities.Employee", "Employee")
|
||
|
|
.WithMany("Attendances")
|
||
|
|
.HasForeignKey("EmployeeId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.Navigation("Employee");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Branch", b =>
|
||
|
|
{
|
||
|
|
b.HasOne("Meezi.Core.Entities.Cafe", "Cafe")
|
||
|
|
.WithMany("Branches")
|
||
|
|
.HasForeignKey("CafeId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.Navigation("Cafe");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.BranchMenuItemOverride", b =>
|
||
|
|
{
|
||
|
|
b.HasOne("Meezi.Core.Entities.Branch", "Branch")
|
||
|
|
.WithMany()
|
||
|
|
.HasForeignKey("BranchId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.HasOne("Meezi.Core.Entities.MenuItem", "MenuItem")
|
||
|
|
.WithMany("BranchOverrides")
|
||
|
|
.HasForeignKey("MenuItemId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.Navigation("Branch");
|
||
|
|
|
||
|
|
b.Navigation("MenuItem");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.CafeReview", b =>
|
||
|
|
{
|
||
|
|
b.HasOne("Meezi.Core.Entities.Cafe", "Cafe")
|
||
|
|
.WithMany("Reviews")
|
||
|
|
.HasForeignKey("CafeId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.Navigation("Cafe");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.CashTransaction", b =>
|
||
|
|
{
|
||
|
|
b.HasOne("Meezi.Core.Entities.Branch", "Branch")
|
||
|
|
.WithMany()
|
||
|
|
.HasForeignKey("BranchId")
|
||
|
|
.OnDelete(DeleteBehavior.SetNull);
|
||
|
|
|
||
|
|
b.HasOne("Meezi.Core.Entities.Shift", "Shift")
|
||
|
|
.WithMany("Transactions")
|
||
|
|
.HasForeignKey("ShiftId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.Navigation("Branch");
|
||
|
|
|
||
|
|
b.Navigation("Shift");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Coupon", b =>
|
||
|
|
{
|
||
|
|
b.HasOne("Meezi.Core.Entities.Cafe", "Cafe")
|
||
|
|
.WithMany("Coupons")
|
||
|
|
.HasForeignKey("CafeId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.Navigation("Cafe");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Customer", b =>
|
||
|
|
{
|
||
|
|
b.HasOne("Meezi.Core.Entities.Cafe", "Cafe")
|
||
|
|
.WithMany("Customers")
|
||
|
|
.HasForeignKey("CafeId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.Navigation("Cafe");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.DailyReport", b =>
|
||
|
|
{
|
||
|
|
b.HasOne("Meezi.Core.Entities.Branch", "Branch")
|
||
|
|
.WithMany()
|
||
|
|
.HasForeignKey("BranchId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.Navigation("Branch");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Employee", b =>
|
||
|
|
{
|
||
|
|
b.HasOne("Meezi.Core.Entities.Branch", "Branch")
|
||
|
|
.WithMany("Staff")
|
||
|
|
.HasForeignKey("BranchId")
|
||
|
|
.OnDelete(DeleteBehavior.SetNull);
|
||
|
|
|
||
|
|
b.HasOne("Meezi.Core.Entities.Cafe", "Cafe")
|
||
|
|
.WithMany("Employees")
|
||
|
|
.HasForeignKey("CafeId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.Navigation("Branch");
|
||
|
|
|
||
|
|
b.Navigation("Cafe");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.EmployeeSalary", b =>
|
||
|
|
{
|
||
|
|
b.HasOne("Meezi.Core.Entities.Employee", "Employee")
|
||
|
|
.WithMany("Salaries")
|
||
|
|
.HasForeignKey("EmployeeId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.Navigation("Employee");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.EmployeeSchedule", b =>
|
||
|
|
{
|
||
|
|
b.HasOne("Meezi.Core.Entities.Employee", "Employee")
|
||
|
|
.WithMany("Schedules")
|
||
|
|
.HasForeignKey("EmployeeId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.Navigation("Employee");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Expense", b =>
|
||
|
|
{
|
||
|
|
b.HasOne("Meezi.Core.Entities.Branch", "Branch")
|
||
|
|
.WithMany()
|
||
|
|
.HasForeignKey("BranchId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.HasOne("Meezi.Core.Entities.Shift", "Shift")
|
||
|
|
.WithMany()
|
||
|
|
.HasForeignKey("ShiftId")
|
||
|
|
.OnDelete(DeleteBehavior.SetNull);
|
||
|
|
|
||
|
|
b.Navigation("Branch");
|
||
|
|
|
||
|
|
b.Navigation("Shift");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Ingredient", b =>
|
||
|
|
{
|
||
|
|
b.HasOne("Meezi.Core.Entities.Cafe", "Cafe")
|
||
|
|
.WithMany("Ingredients")
|
||
|
|
.HasForeignKey("CafeId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.Navigation("Cafe");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.LeaveRequest", b =>
|
||
|
|
{
|
||
|
|
b.HasOne("Meezi.Core.Entities.Employee", "Employee")
|
||
|
|
.WithMany("LeaveRequests")
|
||
|
|
.HasForeignKey("EmployeeId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.Navigation("Employee");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.MenuCategory", b =>
|
||
|
|
{
|
||
|
|
b.HasOne("Meezi.Core.Entities.Cafe", "Cafe")
|
||
|
|
.WithMany("MenuCategories")
|
||
|
|
.HasForeignKey("CafeId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.HasOne("Meezi.Core.Entities.Tax", "Tax")
|
||
|
|
.WithMany("MenuCategories")
|
||
|
|
.HasForeignKey("TaxId")
|
||
|
|
.OnDelete(DeleteBehavior.SetNull);
|
||
|
|
|
||
|
|
b.Navigation("Cafe");
|
||
|
|
|
||
|
|
b.Navigation("Tax");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.MenuItem", b =>
|
||
|
|
{
|
||
|
|
b.HasOne("Meezi.Core.Entities.Cafe", "Cafe")
|
||
|
|
.WithMany("MenuItems")
|
||
|
|
.HasForeignKey("CafeId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.HasOne("Meezi.Core.Entities.MenuCategory", "Category")
|
||
|
|
.WithMany("MenuItems")
|
||
|
|
.HasForeignKey("CategoryId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.Navigation("Cafe");
|
||
|
|
|
||
|
|
b.Navigation("Category");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Order", b =>
|
||
|
|
{
|
||
|
|
b.HasOne("Meezi.Core.Entities.Branch", "Branch")
|
||
|
|
.WithMany("Orders")
|
||
|
|
.HasForeignKey("BranchId")
|
||
|
|
.OnDelete(DeleteBehavior.SetNull);
|
||
|
|
|
||
|
|
b.HasOne("Meezi.Core.Entities.Cafe", "Cafe")
|
||
|
|
.WithMany("Orders")
|
||
|
|
.HasForeignKey("CafeId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.HasOne("Meezi.Core.Entities.Coupon", "Coupon")
|
||
|
|
.WithMany("Orders")
|
||
|
|
.HasForeignKey("CouponId")
|
||
|
|
.OnDelete(DeleteBehavior.SetNull);
|
||
|
|
|
||
|
|
b.HasOne("Meezi.Core.Entities.Customer", "Customer")
|
||
|
|
.WithMany("Orders")
|
||
|
|
.HasForeignKey("CustomerId")
|
||
|
|
.OnDelete(DeleteBehavior.SetNull);
|
||
|
|
|
||
|
|
b.HasOne("Meezi.Core.Entities.Employee", "Employee")
|
||
|
|
.WithMany("Orders")
|
||
|
|
.HasForeignKey("EmployeeId")
|
||
|
|
.OnDelete(DeleteBehavior.SetNull);
|
||
|
|
|
||
|
|
b.HasOne("Meezi.Core.Entities.TableReservation", "Reservation")
|
||
|
|
.WithMany()
|
||
|
|
.HasForeignKey("ReservationId")
|
||
|
|
.OnDelete(DeleteBehavior.SetNull);
|
||
|
|
|
||
|
|
b.HasOne("Meezi.Core.Entities.Table", "Table")
|
||
|
|
.WithMany("Orders")
|
||
|
|
.HasForeignKey("TableId")
|
||
|
|
.OnDelete(DeleteBehavior.SetNull);
|
||
|
|
|
||
|
|
b.Navigation("Branch");
|
||
|
|
|
||
|
|
b.Navigation("Cafe");
|
||
|
|
|
||
|
|
b.Navigation("Coupon");
|
||
|
|
|
||
|
|
b.Navigation("Customer");
|
||
|
|
|
||
|
|
b.Navigation("Employee");
|
||
|
|
|
||
|
|
b.Navigation("Reservation");
|
||
|
|
|
||
|
|
b.Navigation("Table");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.OrderItem", b =>
|
||
|
|
{
|
||
|
|
b.HasOne("Meezi.Core.Entities.MenuItem", "MenuItem")
|
||
|
|
.WithMany("OrderItems")
|
||
|
|
.HasForeignKey("MenuItemId")
|
||
|
|
.OnDelete(DeleteBehavior.Restrict)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.HasOne("Meezi.Core.Entities.Order", "Order")
|
||
|
|
.WithMany("Items")
|
||
|
|
.HasForeignKey("OrderId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.Navigation("MenuItem");
|
||
|
|
|
||
|
|
b.Navigation("Order");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Payment", b =>
|
||
|
|
{
|
||
|
|
b.HasOne("Meezi.Core.Entities.Order", "Order")
|
||
|
|
.WithMany("Payments")
|
||
|
|
.HasForeignKey("OrderId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.Navigation("Order");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.QueueTicket", b =>
|
||
|
|
{
|
||
|
|
b.HasOne("Meezi.Core.Entities.Branch", "Branch")
|
||
|
|
.WithMany()
|
||
|
|
.HasForeignKey("BranchId")
|
||
|
|
.OnDelete(DeleteBehavior.SetNull);
|
||
|
|
|
||
|
|
b.HasOne("Meezi.Core.Entities.Cafe", "Cafe")
|
||
|
|
.WithMany()
|
||
|
|
.HasForeignKey("CafeId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.HasOne("Meezi.Core.Entities.Order", "Order")
|
||
|
|
.WithMany()
|
||
|
|
.HasForeignKey("OrderId")
|
||
|
|
.OnDelete(DeleteBehavior.SetNull);
|
||
|
|
|
||
|
|
b.Navigation("Branch");
|
||
|
|
|
||
|
|
b.Navigation("Cafe");
|
||
|
|
|
||
|
|
b.Navigation("Order");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Shift", b =>
|
||
|
|
{
|
||
|
|
b.HasOne("Meezi.Core.Entities.Branch", "Branch")
|
||
|
|
.WithMany()
|
||
|
|
.HasForeignKey("BranchId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.HasOne("Meezi.Core.Entities.Cafe", "Cafe")
|
||
|
|
.WithMany()
|
||
|
|
.HasForeignKey("CafeId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.HasOne("Meezi.Core.Entities.Employee", "ClosedBy")
|
||
|
|
.WithMany()
|
||
|
|
.HasForeignKey("ClosedByUserId")
|
||
|
|
.OnDelete(DeleteBehavior.SetNull);
|
||
|
|
|
||
|
|
b.HasOne("Meezi.Core.Entities.Employee", "OpenedBy")
|
||
|
|
.WithMany()
|
||
|
|
.HasForeignKey("OpenedByUserId")
|
||
|
|
.OnDelete(DeleteBehavior.Restrict)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.Navigation("Branch");
|
||
|
|
|
||
|
|
b.Navigation("Cafe");
|
||
|
|
|
||
|
|
b.Navigation("ClosedBy");
|
||
|
|
|
||
|
|
b.Navigation("OpenedBy");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.StockMovement", b =>
|
||
|
|
{
|
||
|
|
b.HasOne("Meezi.Core.Entities.Cafe", "Cafe")
|
||
|
|
.WithMany()
|
||
|
|
.HasForeignKey("CafeId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.HasOne("Meezi.Core.Entities.Ingredient", "Ingredient")
|
||
|
|
.WithMany("Movements")
|
||
|
|
.HasForeignKey("IngredientId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.Navigation("Cafe");
|
||
|
|
|
||
|
|
b.Navigation("Ingredient");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.SubscriptionPayment", b =>
|
||
|
|
{
|
||
|
|
b.HasOne("Meezi.Core.Entities.Cafe", "Cafe")
|
||
|
|
.WithMany("SubscriptionPayments")
|
||
|
|
.HasForeignKey("CafeId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.Navigation("Cafe");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Table", b =>
|
||
|
|
{
|
||
|
|
b.HasOne("Meezi.Core.Entities.Branch", "Branch")
|
||
|
|
.WithMany("Tables")
|
||
|
|
.HasForeignKey("BranchId")
|
||
|
|
.OnDelete(DeleteBehavior.Restrict)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.HasOne("Meezi.Core.Entities.Cafe", "Cafe")
|
||
|
|
.WithMany("Tables")
|
||
|
|
.HasForeignKey("CafeId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.HasOne("Meezi.Core.Entities.TableSection", "Section")
|
||
|
|
.WithMany("Tables")
|
||
|
|
.HasForeignKey("SectionId")
|
||
|
|
.OnDelete(DeleteBehavior.SetNull);
|
||
|
|
|
||
|
|
b.Navigation("Branch");
|
||
|
|
|
||
|
|
b.Navigation("Cafe");
|
||
|
|
|
||
|
|
b.Navigation("Section");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.TableReservation", b =>
|
||
|
|
{
|
||
|
|
b.HasOne("Meezi.Core.Entities.Cafe", "Cafe")
|
||
|
|
.WithMany()
|
||
|
|
.HasForeignKey("CafeId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.HasOne("Meezi.Core.Entities.Customer", "Customer")
|
||
|
|
.WithMany()
|
||
|
|
.HasForeignKey("CustomerId")
|
||
|
|
.OnDelete(DeleteBehavior.SetNull);
|
||
|
|
|
||
|
|
b.HasOne("Meezi.Core.Entities.Table", "Table")
|
||
|
|
.WithMany()
|
||
|
|
.HasForeignKey("TableId")
|
||
|
|
.OnDelete(DeleteBehavior.SetNull);
|
||
|
|
|
||
|
|
b.Navigation("Cafe");
|
||
|
|
|
||
|
|
b.Navigation("Customer");
|
||
|
|
|
||
|
|
b.Navigation("Table");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.TableSection", b =>
|
||
|
|
{
|
||
|
|
b.HasOne("Meezi.Core.Entities.Branch", "Branch")
|
||
|
|
.WithMany("Sections")
|
||
|
|
.HasForeignKey("BranchId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.Navigation("Branch");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Tax", b =>
|
||
|
|
{
|
||
|
|
b.HasOne("Meezi.Core.Entities.Cafe", "Cafe")
|
||
|
|
.WithMany("Taxes")
|
||
|
|
.HasForeignKey("CafeId")
|
||
|
|
.OnDelete(DeleteBehavior.Cascade)
|
||
|
|
.IsRequired();
|
||
|
|
|
||
|
|
b.Navigation("Cafe");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Branch", b =>
|
||
|
|
{
|
||
|
|
b.Navigation("Orders");
|
||
|
|
|
||
|
|
b.Navigation("Sections");
|
||
|
|
|
||
|
|
b.Navigation("Staff");
|
||
|
|
|
||
|
|
b.Navigation("Tables");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Cafe", b =>
|
||
|
|
{
|
||
|
|
b.Navigation("Branches");
|
||
|
|
|
||
|
|
b.Navigation("Coupons");
|
||
|
|
|
||
|
|
b.Navigation("Customers");
|
||
|
|
|
||
|
|
b.Navigation("Employees");
|
||
|
|
|
||
|
|
b.Navigation("Ingredients");
|
||
|
|
|
||
|
|
b.Navigation("MenuCategories");
|
||
|
|
|
||
|
|
b.Navigation("MenuItems");
|
||
|
|
|
||
|
|
b.Navigation("Orders");
|
||
|
|
|
||
|
|
b.Navigation("Reviews");
|
||
|
|
|
||
|
|
b.Navigation("SubscriptionPayments");
|
||
|
|
|
||
|
|
b.Navigation("Tables");
|
||
|
|
|
||
|
|
b.Navigation("Taxes");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Coupon", b =>
|
||
|
|
{
|
||
|
|
b.Navigation("Orders");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Customer", b =>
|
||
|
|
{
|
||
|
|
b.Navigation("Orders");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Employee", b =>
|
||
|
|
{
|
||
|
|
b.Navigation("Attendances");
|
||
|
|
|
||
|
|
b.Navigation("LeaveRequests");
|
||
|
|
|
||
|
|
b.Navigation("Orders");
|
||
|
|
|
||
|
|
b.Navigation("Salaries");
|
||
|
|
|
||
|
|
b.Navigation("Schedules");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Ingredient", b =>
|
||
|
|
{
|
||
|
|
b.Navigation("Movements");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.MenuCategory", b =>
|
||
|
|
{
|
||
|
|
b.Navigation("MenuItems");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.MenuItem", b =>
|
||
|
|
{
|
||
|
|
b.Navigation("BranchOverrides");
|
||
|
|
|
||
|
|
b.Navigation("OrderItems");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Order", b =>
|
||
|
|
{
|
||
|
|
b.Navigation("Items");
|
||
|
|
|
||
|
|
b.Navigation("Payments");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Shift", b =>
|
||
|
|
{
|
||
|
|
b.Navigation("Transactions");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Table", b =>
|
||
|
|
{
|
||
|
|
b.Navigation("Orders");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.TableSection", b =>
|
||
|
|
{
|
||
|
|
b.Navigation("Tables");
|
||
|
|
});
|
||
|
|
|
||
|
|
modelBuilder.Entity("Meezi.Core.Entities.Tax", b =>
|
||
|
|
{
|
||
|
|
b.Navigation("MenuCategories");
|
||
|
|
});
|
||
|
|
#pragma warning restore 612, 618
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|