ef15fd6247
Full backend implementation: - Multi-tenant cafe/restaurant management (menus, orders, tables, staff) - POS order flow with ZarinPal and Snappfood payment integration - OTP authentication via Kavenegar SMS - QR digital menu with public discover/finder endpoints - Customer loyalty, coupons, CRM - PostgreSQL via EF Core, Redis for caching/sessions - Background jobs, webhook handlers - Full migration history Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
92 lines
2.6 KiB
C#
92 lines
2.6 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Meezi.Infrastructure.Data.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class QrGuestMenuAndBranchIdentity : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "Source",
|
|
table: "Orders",
|
|
type: "integer",
|
|
nullable: false,
|
|
defaultValue: 0);
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "AllowBranchTaxOverride",
|
|
table: "Cafes",
|
|
type: "boolean",
|
|
nullable: false,
|
|
defaultValue: false);
|
|
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "DefaultTaxRate",
|
|
table: "Cafes",
|
|
type: "numeric",
|
|
nullable: false,
|
|
defaultValue: 0m);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "AccentColor",
|
|
table: "Branches",
|
|
type: "text",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "LogoUrl",
|
|
table: "Branches",
|
|
type: "text",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "TaxRate",
|
|
table: "Branches",
|
|
type: "numeric",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "WelcomeText",
|
|
table: "Branches",
|
|
type: "text",
|
|
nullable: true);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "Source",
|
|
table: "Orders");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "AllowBranchTaxOverride",
|
|
table: "Cafes");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "DefaultTaxRate",
|
|
table: "Cafes");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "AccentColor",
|
|
table: "Branches");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "LogoUrl",
|
|
table: "Branches");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "TaxRate",
|
|
table: "Branches");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "WelcomeText",
|
|
table: "Branches");
|
|
}
|
|
}
|
|
}
|