<?php

namespace App\Modules\{{ module }}\Domain;

{{ imports }}

class {{ module }} extends AggregateRoot
{
    /** @return AggregateAttribute[] */
    public static function attributes(): array
    {
        return [
{{ attrs }}
        ];
    }

    public static function table(): string
    {
        return '{{ table }}';
    }

    public function __construct(
{{ ctor }}
    ) {}

{{ getters }}

{{ setters }}

    public function delete(): void
    {
        $this->status = new {{ module }}Status({{ module }}Status::DELETED);
        $this->dateUpdate = {{ module }}DateUpdate::nowPeru();
        $this->updateAttribute('status');
        $this->updateAttribute('dateUpdate');
    }
}
