using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable #pragma warning disable CA1814 // Prefer jagged arrays over multidimensional namespace Marco.Pms.DataAccess.Migrations { /// public partial class Added_Purchase_Invoice_Permissions : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.InsertData( table: "Modules", columns: new[] { "Id", "Description", "Key", "Name" }, values: new object[] { new Guid("74e7af50-d55f-4b59-a724-9847ceb7bc17"), "Inventory Module", "504ec132-e6a9-422f-8f85-050602cfce05", "Inventory" }); migrationBuilder.InsertData( table: "Features", columns: new[] { "Id", "Description", "IsActive", "ModuleId", "Name" }, values: new object[] { new Guid("271cc47f-7b05-46c7-b5ae-ef0177ec3b60"), "Managing all Purchase invoice related rights", true, new Guid("74e7af50-d55f-4b59-a724-9847ceb7bc17"), "Purchase Invoice Management" }); migrationBuilder.InsertData( table: "FeaturePermissions", columns: new[] { "Id", "Description", "FeatureId", "IsEnabled", "Name" }, values: new object[,] { { new Guid("68ff925d-8ebf-4034-a137-8d3317c56ca1"), "Allows full control to create, edit, and process purchase invoices.", new Guid("271cc47f-7b05-46c7-b5ae-ef0177ec3b60"), true, "Manage Purchase Invoice" }, { new Guid("91e09825-512a-465e-82ad-fa355b305585"), "Allows the user to view only the purchase invoices they created.", new Guid("271cc47f-7b05-46c7-b5ae-ef0177ec3b60"), true, "View Self Purchase Invoice" }, { new Guid("a4b77638-bf31-42bb-afd4-d5bbd15ccadc"), "Allows the user to mark purchase invoices as inactive or void.", new Guid("271cc47f-7b05-46c7-b5ae-ef0177ec3b60"), true, "Delete Purchase Invoice" }, { new Guid("b24eba39-4a92-4f7a-b33b-b5308fbc48b9"), "Allows the user to create delivery challans for purchase invoices.", new Guid("271cc47f-7b05-46c7-b5ae-ef0177ec3b60"), true, "Add Delivery Challan" }, { new Guid("d6ae78d3-a941-4cc4-8d0a-d40479be4211"), "Allows the user to view all purchase invoices across the entire organization.", new Guid("271cc47f-7b05-46c7-b5ae-ef0177ec3b60"), true, "View All Purchase Invoice" } }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DeleteData( table: "FeaturePermissions", keyColumn: "Id", keyValue: new Guid("68ff925d-8ebf-4034-a137-8d3317c56ca1")); migrationBuilder.DeleteData( table: "FeaturePermissions", keyColumn: "Id", keyValue: new Guid("91e09825-512a-465e-82ad-fa355b305585")); migrationBuilder.DeleteData( table: "FeaturePermissions", keyColumn: "Id", keyValue: new Guid("a4b77638-bf31-42bb-afd4-d5bbd15ccadc")); migrationBuilder.DeleteData( table: "FeaturePermissions", keyColumn: "Id", keyValue: new Guid("b24eba39-4a92-4f7a-b33b-b5308fbc48b9")); migrationBuilder.DeleteData( table: "FeaturePermissions", keyColumn: "Id", keyValue: new Guid("d6ae78d3-a941-4cc4-8d0a-d40479be4211")); migrationBuilder.DeleteData( table: "Features", keyColumn: "Id", keyValue: new Guid("271cc47f-7b05-46c7-b5ae-ef0177ec3b60")); migrationBuilder.DeleteData( table: "Modules", keyColumn: "Id", keyValue: new Guid("74e7af50-d55f-4b59-a724-9847ceb7bc17")); } } }