import type { ProjectDevelopmentStatus, UserRole } from '@prisma/client';

export class UpdateProjectCommand {
  constructor(
    public readonly id: string,
    /** User performing the update. Used to enforce ownership for DEVELOPER role. */
    public readonly requesterUserId: string,
    public readonly requesterRole: UserRole,
    public readonly name?: string,
    public readonly developer?: string,
    public readonly developerLogo?: string | null,
    public readonly totalUnits?: number,
    public readonly completedUnits?: number,
    public readonly status?: ProjectDevelopmentStatus,
    public readonly description?: string | null,
    public readonly amenities?: Record<string, unknown> | null,
    public readonly masterPlanUrl?: string | null,
    public readonly minPrice?: bigint | null,
    public readonly maxPrice?: bigint | null,
    public readonly pricePerM2Range?: Record<string, unknown> | null,
    public readonly totalArea?: number | null,
    public readonly buildingCount?: number | null,
    public readonly floorCount?: number | null,
    public readonly unitTypes?: Record<string, unknown> | null,
    public readonly media?: Record<string, unknown>[] | null,
    public readonly documents?: Record<string, unknown>[] | null,
    public readonly tags?: string[],
    public readonly isVerified?: boolean,
    public readonly startDate?: Date | null,
    public readonly completionDate?: Date | null,
    public readonly suitableFor?: string[],
    public readonly whyThisLocation?: string | null,
    /** Admin-only: reassign the owning DEVELOPER user. Null to unassign. */
    public readonly ownerId?: string | null,
  ) {}
}
