233 lines
12 KiB
C#
233 lines
12 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace line_gestao_api.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddResumoTables : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "ResumoClienteEspeciais",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
|
TenantId = table.Column<Guid>(type: "uuid", nullable: false),
|
|
Nome = table.Column<string>(type: "text", nullable: true),
|
|
Valor = table.Column<decimal>(type: "numeric", nullable: true),
|
|
CreatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
UpdatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_ResumoClienteEspeciais", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "ResumoLineTotais",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
|
TenantId = table.Column<Guid>(type: "uuid", nullable: false),
|
|
Tipo = table.Column<string>(type: "text", nullable: true),
|
|
ValorTotalLine = table.Column<decimal>(type: "numeric", nullable: true),
|
|
LucroTotalLine = table.Column<decimal>(type: "numeric", nullable: true),
|
|
QtdLinhas = table.Column<int>(type: "integer", nullable: true),
|
|
CreatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
UpdatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_ResumoLineTotais", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "ResumoMacrophonyPlans",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
|
TenantId = table.Column<Guid>(type: "uuid", nullable: false),
|
|
PlanoContrato = table.Column<string>(type: "text", nullable: true),
|
|
Gb = table.Column<decimal>(type: "numeric", nullable: true),
|
|
ValorIndividualComSvas = table.Column<decimal>(type: "numeric", nullable: true),
|
|
FranquiaGb = table.Column<decimal>(type: "numeric", nullable: true),
|
|
TotalLinhas = table.Column<int>(type: "integer", nullable: true),
|
|
ValorTotal = table.Column<decimal>(type: "numeric", nullable: true),
|
|
VivoTravel = table.Column<bool>(type: "boolean", nullable: false),
|
|
CreatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
UpdatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_ResumoMacrophonyPlans", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "ResumoMacrophonyTotals",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
|
TenantId = table.Column<Guid>(type: "uuid", nullable: false),
|
|
FranquiaGbTotal = table.Column<decimal>(type: "numeric", nullable: true),
|
|
TotalLinhasTotal = table.Column<int>(type: "integer", nullable: true),
|
|
ValorTotal = table.Column<decimal>(type: "numeric", nullable: true),
|
|
CreatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
UpdatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_ResumoMacrophonyTotals", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "ResumoPlanoContratoResumos",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
|
TenantId = table.Column<Guid>(type: "uuid", nullable: false),
|
|
PlanoContrato = table.Column<string>(type: "text", nullable: true),
|
|
Gb = table.Column<decimal>(type: "numeric", nullable: true),
|
|
ValorIndividualComSvas = table.Column<decimal>(type: "numeric", nullable: true),
|
|
FranquiaGb = table.Column<decimal>(type: "numeric", nullable: true),
|
|
TotalLinhas = table.Column<int>(type: "integer", nullable: true),
|
|
ValorTotal = table.Column<decimal>(type: "numeric", nullable: true),
|
|
CreatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
UpdatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_ResumoPlanoContratoResumos", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "ResumoPlanoContratoTotals",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
|
TenantId = table.Column<Guid>(type: "uuid", nullable: false),
|
|
ValorTotal = table.Column<decimal>(type: "numeric", nullable: true),
|
|
CreatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
UpdatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_ResumoPlanoContratoTotals", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "ResumoReservaLines",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
|
TenantId = table.Column<Guid>(type: "uuid", nullable: false),
|
|
Ddd = table.Column<string>(type: "text", nullable: true),
|
|
FranquiaGb = table.Column<decimal>(type: "numeric", nullable: true),
|
|
QtdLinhas = table.Column<int>(type: "integer", nullable: true),
|
|
Total = table.Column<decimal>(type: "numeric", nullable: true),
|
|
CreatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
UpdatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_ResumoReservaLines", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "ResumoReservaTotals",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
|
TenantId = table.Column<Guid>(type: "uuid", nullable: false),
|
|
QtdLinhasTotal = table.Column<int>(type: "integer", nullable: true),
|
|
Total = table.Column<decimal>(type: "numeric", nullable: true),
|
|
CreatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
UpdatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_ResumoReservaTotals", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "ResumoVivoLineResumos",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
|
TenantId = table.Column<Guid>(type: "uuid", nullable: false),
|
|
Skil = table.Column<string>(type: "text", nullable: true),
|
|
Cliente = table.Column<string>(type: "text", nullable: true),
|
|
QtdLinhas = table.Column<int>(type: "integer", nullable: true),
|
|
FranquiaTotal = table.Column<decimal>(type: "numeric", nullable: true),
|
|
ValorContratoVivo = table.Column<decimal>(type: "numeric", nullable: true),
|
|
FranquiaLine = table.Column<decimal>(type: "numeric", nullable: true),
|
|
ValorContratoLine = table.Column<decimal>(type: "numeric", nullable: true),
|
|
Lucro = table.Column<decimal>(type: "numeric", nullable: true),
|
|
CreatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
UpdatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_ResumoVivoLineResumos", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "ResumoVivoLineTotals",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
|
TenantId = table.Column<Guid>(type: "uuid", nullable: false),
|
|
QtdLinhasTotal = table.Column<int>(type: "integer", nullable: true),
|
|
FranquiaTotal = table.Column<decimal>(type: "numeric", nullable: true),
|
|
ValorContratoVivo = table.Column<decimal>(type: "numeric", nullable: true),
|
|
FranquiaLine = table.Column<decimal>(type: "numeric", nullable: true),
|
|
ValorContratoLine = table.Column<decimal>(type: "numeric", nullable: true),
|
|
Lucro = table.Column<decimal>(type: "numeric", nullable: true),
|
|
CreatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
|
UpdatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_ResumoVivoLineTotals", x => x.Id);
|
|
});
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "ResumoClienteEspeciais");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "ResumoLineTotais");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "ResumoMacrophonyPlans");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "ResumoMacrophonyTotals");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "ResumoPlanoContratoResumos");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "ResumoPlanoContratoTotals");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "ResumoReservaLines");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "ResumoReservaTotals");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "ResumoVivoLineResumos");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "ResumoVivoLineTotals");
|
|
}
|
|
}
|
|
}
|