<?php

declare(strict_types=1);

namespace OCA\Mitgliederverwaltung\Db;

use JsonSerializable;
use OCP\AppFramework\Db\Entity;

/**
 * Lager (camp) entity mapping oc_mv_lager.
 *
 * Part of Issue #54.
 *
 * @method string getName()
 * @method void setName(string $name)
 * @method string getStartdatum()
 * @method void setStartdatum(string $startdatum)
 * @method string getEnddatum()
 * @method void setEnddatum(string $enddatum)
 * @method string|null getOrt()
 * @method void setOrt(?string $ort)
 * @method string|null getBeschreibung()
 * @method void setBeschreibung(?string $beschreibung)
 * @method string|null getFilesFolderPath()
 * @method void setFilesFolderPath(?string $filesFolderPath)
 * @method string getCreatedAt()
 * @method void setCreatedAt(string $createdAt)
 * @method string getUpdatedAt()
 * @method void setUpdatedAt(string $updatedAt)
 */
class Lager extends Entity implements JsonSerializable {

    protected string $name = '';
    protected string $startdatum = '';
    protected string $enddatum = '';
    protected ?string $ort = null;
    protected ?string $beschreibung = null;
    protected ?string $filesFolderPath = null;
    protected string $createdAt = '';
    protected string $updatedAt = '';

    public function __construct() {
        $this->addType('id', 'integer');
    }

    public function jsonSerialize(): array {
        return [
            'id' => $this->id,
            'name' => $this->name,
            'startdatum' => $this->startdatum,
            'enddatum' => $this->enddatum,
            'ort' => $this->ort,
            'beschreibung' => $this->beschreibung,
            'filesFolderPath' => $this->filesFolderPath,
            'createdAt' => $this->createdAt,
            'updatedAt' => $this->updatedAt,
        ];
    }
}
