<?php
/**
 * Service Class
 *
 * @version     1.0.$Revision:$
 * @version     SVN: $Id:$
 * @version     STUB: 1.1.0
 * @generated   2025-06-15 00:00:00
 * @package     bplan-base/globals
 * @subpackage  Services
 * @author      Emilio Cannarozzo <emilio.cannarozzo@bplan-solutions.de>
 * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
 * @copyright   Copyright (C) 2025, 2026 bplan-solutions GmbH & Co. KG <https://www.bplan-solutions.de/>
 * /Δ\
 */

namespace BplanBase\Globals\Services;


use BplanBase\Globals\Actions\TenantRecord\Create;
use BplanBase\Globals\Actions\TenantRecord\Delete;
use BplanBase\Globals\Actions\TenantRecord\Update;
use BplanBase\Globals\Actions\TenantRecord\UpdateActiveStatus;
use BplanBase\Globals\Models\Tenant;
use BplanBase\Globals\Models\TenantRecord;


/**
 * Service Class
 *
 * @version     2.1.0 / 2025-06-15
 * @author      Emilio Cannarozzo <emilio.cannarozzo@bplan-solutions.de>
 * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
 */
class TenantRecordService
{

/* +++ TRAITS +++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */


/* +++ CLASS CONSTANTS +++ ++++++++++++++++++++++++++++++++++++++++++++++++++ */


/* +++ OBJECT MEMBERS +++ +++++++++++++++++++++++++++++++++++++++++++++++++++ */


/* +++ CLASS MEMBERS +++ ++++++++++++++++++++++++++++++++++++++++++++++++++++ */


/* +++ OBJECT METHODS +++ +++++++++++++++++++++++++++++++++++++++++++++++++++ */


    /**
     *
     * @param       Tenant $Tenant
     *
     * @return      TenantRecord
     *
     * @version     2.0.0 / 2025-05-27
     * @author      Emilio Cannarozzo <emilio.cannarozzo@bplan-solutions.de>
     * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
     */
    public function create(Tenant $Tenant): TenantRecord
    {
        $Action = new Create();

        return $Action->execute($Tenant);

    } // create()


    /**
     *
     * @param       int|string|TenantRecord $tenantRecord
     *
     * @return      TenantRecord
     *
     * @version     2.0.0 / 2025-05-14
     * @author      Emilio Cannarozzo <emilio.cannarozzo@bplan-solutions.de>
     * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
     */
    public function delete(int|string|TenantRecord $tenantRecord): TenantRecord
    {
        $Action = new Delete();

        return $Action->execute($tenantRecord);

    } // delete()


    /**
     *
     * @param       int|string|TenantRecord $tenantRecord
     *
     * @param       array $attributes
     *
     * @return      TenantRecord
     *
     * @version     3.0.0 / 2025-05-27
     * @author      Emilio Cannarozzo <emilio.cannarozzo@bplan-solutions.de>
     * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
     */
    public function update(int|string|TenantRecord $tenantRecord, array $attributes): TenantRecord
    {
        $Action = new Update();

        return $Action->execute($tenantRecord, $attributes);

    } // update()


    /**
     *
     * @param       int|string|TenantRecord $tenantRecord
     *
     * @param       bool $status
     *
     * @return      TenantRecord
     *
     * @version     1.0.0 / 2025-05-27
     * @author      Emilio Cannarozzo <emilio.cannarozzo@bplan-solutions.de>
     * @author      Wassilios Meletiadis <wassilios.meletiadis@bplan-solutions.de>
     */
    public function updateActiveStatus(int|string|TenantRecord $tenantRecord, bool $status): TenantRecord
    {
        $Action = new UpdateActiveStatus();

        return $Action->execute($tenantRecord, $status);

    } // update()


/* +++ CLASS METHODS +++ ++++++++++++++++++++++++++++++++++++++++++++++++++++ */


} // class TenantRecordService {}
