using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional

namespace Marco.Pms.DataAccess.Migrations
{
    /// <inheritdoc />
    public partial class Changed_Freture_Permissions : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DeleteData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("6b1a6d97-a951-4de5-9b19-709bac7c4f18"));

            migrationBuilder.DeleteData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("cb8ec407-46d4-4467-930c-69127cda6dec"));

            migrationBuilder.DeleteData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("d135a4b0-4f9a-4903-ab9c-4843839ebdee"));

            migrationBuilder.DeleteData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("ed99ecd4-1bed-42e1-b7b3-d64c04493823"));

            migrationBuilder.DeleteData(
                table: "Features",
                keyColumn: "Id",
                keyValue: new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"));

            migrationBuilder.DeleteData(
                table: "Features",
                keyColumn: "Id",
                keyValue: new Guid("660131a4-788c-4739-a082-cbbf7879cbf2"));

            migrationBuilder.UpdateData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("08752f33-3b29-4816-b76b-ea8a968ed3c5"),
                columns: new[] { "Description", "Name" },
                values: new object[] { "This allows them to create new tasks, modify existing task attributes (description, status, assignee, due date, etc.),", "Add/Edit Task" });

            migrationBuilder.UpdateData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("172fc9b6-755b-4f62-ab26-55c34a330614"),
                column: "Description",
                value: "Potentially edit the project name, description, start/end dates, or status.");

            migrationBuilder.UpdateData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("57802c4a-00aa-4a1f-a048-fd2f70dd44b6"),
                column: "Description",
                value: "Grants a user the authority to approve requests from employees to adjust or correct their recorded attendance. This typically involves reviewing the reason for the regularization, verifying any supporting documentation, and then officially accepting the changes to the employee's attendance records");

            migrationBuilder.UpdateData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("588a8824-f924-4955-82d8-fc51956cf323"),
                column: "Description",
                value: "Grants a user the authority to create, modify, and delete foundational or reference data within the system. These \"masters\" are typically the core lists, categories, and configurations that other data and functionalities rely upon, such as departments, job titles, product categories");

            migrationBuilder.UpdateData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("5ffbafe0-7ab0-48b1-bb50-c1bf76b65f9d"),
                column: "Description",
                value: "Grants a user read-only access to foundational or reference data within the system. \"Masters\" typically refer to predefined lists, categories, or templates that are used throughout the application to standardize information and maintain consistency");

            migrationBuilder.UpdateData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("6ea44136-987e-44ba-9e5d-1cf8f5837ebc"),
                column: "Description",
                value: "Access all information related to the project.");

            migrationBuilder.UpdateData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("915e6bff-65f6-4e3f-aea8-3fd217d3ea9e"),
                column: "Description",
                value: "Grants a user the ability to record their own work hours or presence within the system. This typically involves checking in and checking out, logging break times, and potentially viewing their own attendance history.");

            migrationBuilder.UpdateData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("9fcc5f87-25e3-4846-90ac-67a71ab92e3c"),
                column: "Description",
                value: "Grants a user comprehensive read-only access to all details associated with tasks within a project. This includes task descriptions, statuses, assignees, due dates, dependencies, progress, history, and any related attachments or discussions.");

            migrationBuilder.UpdateData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("a97d366a-c2bb-448d-be93-402bd2324566"),
                columns: new[] { "Description", "Name" },
                values: new object[] { "Grants a user the authority to create new employee profiles and modify existing employee details within the system. This typically includes adding or updating information such as names, contact details, roles, departments, skills, and potentially other personal or professional data", "Add/Edit Employee" });

            migrationBuilder.UpdateData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("b82d2b7e-0d52-45f3-997b-c008ea460e7f"),
                column: "Description",
                value: "Grants a user read-only access to details about the individuals within the system. This typically includes names, contact information, roles, departments, and potentially other relevant employee data");

            migrationBuilder.UpdateData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("b94802ce-0689-4643-9e1d-11c86950c35b"),
                column: "Description",
                value: "The \"Manage Team\" feature allows authorized users to organize project personnel by adding, removing, and assigning employee to projects.");

            migrationBuilder.UpdateData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("c7b68e33-72f0-474f-bd96-77636427ecc8"),
                column: "Description",
                value: "Grants a user comprehensive read-only access to all details concerning the project's underlying systems, technologies, resources, and configurations");

            migrationBuilder.UpdateData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("f2aee20a-b754-4537-8166-f9507b44585b"),
                column: "Description",
                value: "This allows them to create, modify, and manage all aspects of the supporting infrastructure.");

            migrationBuilder.UpdateData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("fbd213e0-0250-46f1-9f5f-4b2a1e6e76a3"),
                columns: new[] { "Description", "Name" },
                values: new object[] { "Grants a user the authority to manage employee application roles, enabling them to assign or revoke access privileges within the system.", "Assign Roles" });

            migrationBuilder.InsertData(
                table: "FeaturePermissions",
                columns: new[] { "Id", "Description", "FeatureId", "IsEnabled", "Name" },
                values: new object[,]
                {
                    { new Guid("6a32379b-8b3f-49a6-8c48-4b7ac1b55dc2"), "Grants a user the ability to designate team members responsible for specific tasks and to update the completion status or provide progress updates for those tasks", new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"), true, "Assign/Report Progress" },
                    { new Guid("db4e40c5-2ba9-4b6d-b8a6-a16a250ff99c"), "Grants a user the authority to officially confirm the completion or acceptance of a task, often signifying that it meets the required standards or criteria", new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"), true, "Approve Task" }
                });

            migrationBuilder.UpdateData(
                table: "Features",
                keyColumn: "Id",
                keyValue: new Guid("81ab8a87-8ccd-4015-a917-0627cee6a100"),
                column: "Name",
                value: "Employee Management");

            migrationBuilder.UpdateData(
                table: "Features",
                keyColumn: "Id",
                keyValue: new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"),
                column: "Name",
                value: "Task Management");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DeleteData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("6a32379b-8b3f-49a6-8c48-4b7ac1b55dc2"));

            migrationBuilder.DeleteData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("db4e40c5-2ba9-4b6d-b8a6-a16a250ff99c"));

            migrationBuilder.UpdateData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("08752f33-3b29-4816-b76b-ea8a968ed3c5"),
                columns: new[] { "Description", "Name" },
                values: new object[] { "", "Manage Task" });

            migrationBuilder.UpdateData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("172fc9b6-755b-4f62-ab26-55c34a330614"),
                column: "Description",
                value: "");

            migrationBuilder.UpdateData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("57802c4a-00aa-4a1f-a048-fd2f70dd44b6"),
                column: "Description",
                value: "");

            migrationBuilder.UpdateData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("588a8824-f924-4955-82d8-fc51956cf323"),
                column: "Description",
                value: "");

            migrationBuilder.UpdateData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("5ffbafe0-7ab0-48b1-bb50-c1bf76b65f9d"),
                column: "Description",
                value: "");

            migrationBuilder.UpdateData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("6ea44136-987e-44ba-9e5d-1cf8f5837ebc"),
                column: "Description",
                value: "");

            migrationBuilder.UpdateData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("915e6bff-65f6-4e3f-aea8-3fd217d3ea9e"),
                column: "Description",
                value: "");

            migrationBuilder.UpdateData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("9fcc5f87-25e3-4846-90ac-67a71ab92e3c"),
                column: "Description",
                value: "");

            migrationBuilder.UpdateData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("a97d366a-c2bb-448d-be93-402bd2324566"),
                columns: new[] { "Description", "Name" },
                values: new object[] { "", "Manage Employee" });

            migrationBuilder.UpdateData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("b82d2b7e-0d52-45f3-997b-c008ea460e7f"),
                column: "Description",
                value: "");

            migrationBuilder.UpdateData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("b94802ce-0689-4643-9e1d-11c86950c35b"),
                column: "Description",
                value: "");

            migrationBuilder.UpdateData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("c7b68e33-72f0-474f-bd96-77636427ecc8"),
                column: "Description",
                value: "");

            migrationBuilder.UpdateData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("f2aee20a-b754-4537-8166-f9507b44585b"),
                column: "Description",
                value: "");

            migrationBuilder.UpdateData(
                table: "FeaturePermissions",
                keyColumn: "Id",
                keyValue: new Guid("fbd213e0-0250-46f1-9f5f-4b2a1e6e76a3"),
                columns: new[] { "Description", "Name" },
                values: new object[] { "", "Assign To Project" });

            migrationBuilder.UpdateData(
                table: "Features",
                keyColumn: "Id",
                keyValue: new Guid("81ab8a87-8ccd-4015-a917-0627cee6a100"),
                column: "Name",
                value: "Manage Employee");

            migrationBuilder.UpdateData(
                table: "Features",
                keyColumn: "Id",
                keyValue: new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"),
                column: "Name",
                value: "Manage Tasks");

            migrationBuilder.InsertData(
                table: "Features",
                columns: new[] { "Id", "Description", "IsActive", "ModuleId", "Name" },
                values: new object[,]
                {
                    { new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"), "Assign and Update Tasks Progress", true, new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), "Assign and Update Tasks Progress" },
                    { new Guid("660131a4-788c-4739-a082-cbbf7879cbf2"), "Tenant Masters", true, new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), "Tenant Masters" }
                });

            migrationBuilder.InsertData(
                table: "FeaturePermissions",
                columns: new[] { "Id", "Description", "FeatureId", "IsEnabled", "Name" },
                values: new object[,]
                {
                    { new Guid("6b1a6d97-a951-4de5-9b19-709bac7c4f18"), "", new Guid("660131a4-788c-4739-a082-cbbf7879cbf2"), true, "Manage Masters" },
                    { new Guid("cb8ec407-46d4-4467-930c-69127cda6dec"), "", new Guid("660131a4-788c-4739-a082-cbbf7879cbf2"), true, "View Masters" },
                    { new Guid("d135a4b0-4f9a-4903-ab9c-4843839ebdee"), "", new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"), true, "Assign Task and Report Progress" },
                    { new Guid("ed99ecd4-1bed-42e1-b7b3-d64c04493823"), "", new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"), true, "Approve Task" }
                });
        }
    }
}
