import {
  UnlockPrivateAlbumRequestSchema,
  type UnlockPrivateAlbumRequestData,
  type UnlockPrivateAlbumRequestInput,
} from "@/data/schemas/private-room";

export class UnlockPrivateAlbumRequest {
  private constructor(input: UnlockPrivateAlbumRequestInput) {
    const data = UnlockPrivateAlbumRequestSchema.parse(input);
    Object.assign(this, data);
    Object.freeze(this);
  }

  static from(input: UnlockPrivateAlbumRequestInput): UnlockPrivateAlbumRequest {
    return new UnlockPrivateAlbumRequest(input);
  }

  toJson(): UnlockPrivateAlbumRequestData {
    return UnlockPrivateAlbumRequestSchema.parse(this);
  }
}
