"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OwnerScopeValuesAll1780930000000 = void 0;
class OwnerScopeValuesAll1780930000000 {
    constructor() {
        this.name = 'OwnerScopeValuesAll1780930000000';
    }
    async up(queryRunner) {
        await queryRunner.query(`
      UPDATE role_permissions rp
      INNER JOIN access_roles ar ON ar.id = rp.role_id
      SET rp.permission_value = 'all'
      WHERE ar.slug = 'owner'
        AND rp.permission_value IN ('own_and_all', 'own')
        AND rp.permission_key IN (
          'dashboard.view',
          'members.view',
          'members.update',
          'members.delete',
          'attendance.view',
          'leave.view',
          'leave.create',
          'leave.update',
          'leave.delete',
          'reports.view',
          'calendar.view',
          'holidays.view',
          'holidays.create',
          'holidays.update',
          'holidays.delete',
          'notice.view',
          'notice.create',
          'notice.update',
          'notice.delete'
        )
    `);
    }
    async down(_queryRunner) {
    }
}
exports.OwnerScopeValuesAll1780930000000 = OwnerScopeValuesAll1780930000000;
//# sourceMappingURL=1780930000000-OwnerScopeValuesAll.js.map