/* Copyright (C) 2024-2025 LibreWeddingPlanner contributors*/

import { Serializable } from "../api/abstract-api";
import { Entity } from "./definitions";


export class Website implements Entity {
  id?: string;
  content?: string;

  constructor(id: string, content: string) {
    this.id = id;
    this.content = content;
  }
}

export class WebsiteSerializer implements Serializable<Website> {
  fromJson(data: any): Website {
    return new Website("", data.content);
  }

  toJson(website: Website): string {
    return JSON.stringify({ website: { content: website.content } });
  }

  apiPath(): string {
    return 'website';
  }
}

