20250204112713_addInvoice.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. #nullable disable
  4. namespace MTWorkHR.Infrastructure.Migrations
  5. {
  6. /// <inheritdoc />
  7. public partial class addInvoice : Migration
  8. {
  9. /// <inheritdoc />
  10. protected override void Up(MigrationBuilder migrationBuilder)
  11. {
  12. migrationBuilder.CreateTable(
  13. name: "Invoice",
  14. columns: table => new
  15. {
  16. Id = table.Column<long>(type: "bigint", nullable: false)
  17. .Annotation("SqlServer:Identity", "1, 1"),
  18. CreateUser = table.Column<string>(type: "nvarchar(450)", maxLength: 450, nullable: true),
  19. UpdateUser = table.Column<string>(type: "nvarchar(450)", maxLength: 450, nullable: true),
  20. CreateDate = table.Column<DateTime>(type: "datetime2", nullable: false),
  21. UpdateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
  22. IsDeleted = table.Column<bool>(type: "bit", nullable: false),
  23. DeleteUserId = table.Column<string>(type: "nvarchar(450)", maxLength: 450, nullable: true),
  24. InvoiceNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
  25. InvoiceDate = table.Column<DateTime>(type: "datetime2", nullable: true),
  26. Amount = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
  27. Status = table.Column<int>(type: "int", nullable: true),
  28. ContractId = table.Column<int>(type: "int", nullable: true),
  29. UserId = table.Column<string>(type: "nvarchar(max)", nullable: true)
  30. },
  31. constraints: table =>
  32. {
  33. table.PrimaryKey("PK_Invoice", x => x.Id);
  34. });
  35. }
  36. /// <inheritdoc />
  37. protected override void Down(MigrationBuilder migrationBuilder)
  38. {
  39. migrationBuilder.DropTable(
  40. name: "Invoice");
  41. }
  42. }
  43. }