341b3cb5670236e20e5ed495f3711b3441111ea94fd2b3ce2c6efad3e83d72f4.json raw

   1  {"ast":null,"code":"import { v4 as uuidv4 } from 'uuid';\nimport { EntityId } from './entity-id';\n/**\n * Strongly-typed identifier for Permission entities.\n * Prevents accidental mixing with other ID types.\n */\nexport class PermissionId extends EntityId {\n  _brand = 'PermissionId';\n  constructor(value) {\n    super(value);\n  }\n  /**\n   * Generate a new unique PermissionId.\n   */\n  static generate() {\n    return new PermissionId(uuidv4());\n  }\n  /**\n   * Create a PermissionId from an existing string value.\n   * Use this when reconstituting from storage.\n   */\n  static from(value) {\n    return new PermissionId(value);\n  }\n  /**\n   * Type guard to check if two IDs are equal.\n   */\n  equals(other) {\n    return other instanceof PermissionId && this._value === other._value;\n  }\n}","map":null,"metadata":{},"sourceType":"module","externalDependencies":[]}