import { UnifiSite } from "../../generated/prisma/client";

/**
 * UniFi Site Controller
 *
 * Handles formatting and presentation of UniFi site data.
 */
export class UnifiSiteController {
  public readonly id: string;
  public readonly name: string;
  public readonly siteId: string;
  public readonly companyId: string | null;

  constructor(site: UnifiSite) {
    this.id = site.id;
    this.name = site.name;
    this.siteId = site.siteId;
    this.companyId = site.companyId;
  }

  public toJson() {
    return {
      id: this.id,
      name: this.name,
      siteId: this.siteId,
      companyId: this.companyId,
    };
  }
}
