67 lines
2.8 KiB
C#
67 lines
2.8 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace line_gestao_api.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class CreateBillingClients : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "billing_clients",
|
|
columns: table => new
|
|
{
|
|
Id = table.Column<Guid>(type: "uuid", nullable: false),
|
|
Tipo = table.Column<string>(type: "character varying(2)", maxLength: 2, nullable: false),
|
|
Item = table.Column<int>(type: "integer", nullable: false),
|
|
Cliente = table.Column<string>(type: "character varying(255)", maxLength: 255, nullable: false),
|
|
QtdLinhas = table.Column<int>(type: "integer", nullable: true),
|
|
FranquiaVivo = 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),
|
|
Aparelho = table.Column<string>(type: "text", nullable: true),
|
|
FormaPagamento = table.Column<string>(type: "text", 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_billing_clients", x => x.Id);
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_billing_clients_Cliente",
|
|
table: "billing_clients",
|
|
column: "Cliente");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_billing_clients_Item",
|
|
table: "billing_clients",
|
|
column: "Item");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_billing_clients_Tipo",
|
|
table: "billing_clients",
|
|
column: "Tipo");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_billing_clients_Tipo_Cliente",
|
|
table: "billing_clients",
|
|
columns: new[] { "Tipo", "Cliente" });
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "billing_clients");
|
|
}
|
|
}
|
|
}
|