using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace line_gestao_api.Migrations { /// public partial class AddResumoTables : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "ResumoClienteEspeciais", columns: table => new { Id = table.Column(type: "uuid", nullable: false), TenantId = table.Column(type: "uuid", nullable: false), Nome = table.Column(type: "text", nullable: true), Valor = table.Column(type: "numeric", nullable: true), CreatedAt = table.Column(type: "timestamp with time zone", nullable: false), UpdatedAt = table.Column(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(type: "uuid", nullable: false), TenantId = table.Column(type: "uuid", nullable: false), Tipo = table.Column(type: "text", nullable: true), ValorTotalLine = table.Column(type: "numeric", nullable: true), LucroTotalLine = table.Column(type: "numeric", nullable: true), QtdLinhas = table.Column(type: "integer", nullable: true), CreatedAt = table.Column(type: "timestamp with time zone", nullable: false), UpdatedAt = table.Column(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(type: "uuid", nullable: false), TenantId = table.Column(type: "uuid", nullable: false), PlanoContrato = table.Column(type: "text", nullable: true), Gb = table.Column(type: "numeric", nullable: true), ValorIndividualComSvas = table.Column(type: "numeric", nullable: true), FranquiaGb = table.Column(type: "numeric", nullable: true), TotalLinhas = table.Column(type: "integer", nullable: true), ValorTotal = table.Column(type: "numeric", nullable: true), VivoTravel = table.Column(type: "boolean", nullable: false), CreatedAt = table.Column(type: "timestamp with time zone", nullable: false), UpdatedAt = table.Column(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(type: "uuid", nullable: false), TenantId = table.Column(type: "uuid", nullable: false), FranquiaGbTotal = table.Column(type: "numeric", nullable: true), TotalLinhasTotal = table.Column(type: "integer", nullable: true), ValorTotal = table.Column(type: "numeric", nullable: true), CreatedAt = table.Column(type: "timestamp with time zone", nullable: false), UpdatedAt = table.Column(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(type: "uuid", nullable: false), TenantId = table.Column(type: "uuid", nullable: false), PlanoContrato = table.Column(type: "text", nullable: true), Gb = table.Column(type: "numeric", nullable: true), ValorIndividualComSvas = table.Column(type: "numeric", nullable: true), FranquiaGb = table.Column(type: "numeric", nullable: true), TotalLinhas = table.Column(type: "integer", nullable: true), ValorTotal = table.Column(type: "numeric", nullable: true), CreatedAt = table.Column(type: "timestamp with time zone", nullable: false), UpdatedAt = table.Column(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(type: "uuid", nullable: false), TenantId = table.Column(type: "uuid", nullable: false), ValorTotal = table.Column(type: "numeric", nullable: true), CreatedAt = table.Column(type: "timestamp with time zone", nullable: false), UpdatedAt = table.Column(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(type: "uuid", nullable: false), TenantId = table.Column(type: "uuid", nullable: false), Ddd = table.Column(type: "text", nullable: true), FranquiaGb = table.Column(type: "numeric", nullable: true), QtdLinhas = table.Column(type: "integer", nullable: true), Total = table.Column(type: "numeric", nullable: true), CreatedAt = table.Column(type: "timestamp with time zone", nullable: false), UpdatedAt = table.Column(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(type: "uuid", nullable: false), TenantId = table.Column(type: "uuid", nullable: false), QtdLinhasTotal = table.Column(type: "integer", nullable: true), Total = table.Column(type: "numeric", nullable: true), CreatedAt = table.Column(type: "timestamp with time zone", nullable: false), UpdatedAt = table.Column(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(type: "uuid", nullable: false), TenantId = table.Column(type: "uuid", nullable: false), Skil = table.Column(type: "text", nullable: true), Cliente = table.Column(type: "text", nullable: true), QtdLinhas = table.Column(type: "integer", nullable: true), FranquiaTotal = table.Column(type: "numeric", nullable: true), ValorContratoVivo = table.Column(type: "numeric", nullable: true), FranquiaLine = table.Column(type: "numeric", nullable: true), ValorContratoLine = table.Column(type: "numeric", nullable: true), Lucro = table.Column(type: "numeric", nullable: true), CreatedAt = table.Column(type: "timestamp with time zone", nullable: false), UpdatedAt = table.Column(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(type: "uuid", nullable: false), TenantId = table.Column(type: "uuid", nullable: false), QtdLinhasTotal = table.Column(type: "integer", nullable: true), FranquiaTotal = table.Column(type: "numeric", nullable: true), ValorContratoVivo = table.Column(type: "numeric", nullable: true), FranquiaLine = table.Column(type: "numeric", nullable: true), ValorContratoLine = table.Column(type: "numeric", nullable: true), Lucro = table.Column(type: "numeric", nullable: true), CreatedAt = table.Column(type: "timestamp with time zone", nullable: false), UpdatedAt = table.Column(type: "timestamp with time zone", nullable: false) }, constraints: table => { table.PrimaryKey("PK_ResumoVivoLineTotals", x => x.Id); }); } /// 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"); } } }