<?php
/**
 *
 * @author Jérôme Brilland
 * @version 1.0
 * @copyright (c) 2018, Jérôme Brilland
 * @license http://www.gnu.org/licenses/gpl.txt GNU General Public License
 */
trait SoftDeleteTrait {

    public function delete() {
        $this->isDeleted = true;
        $this->deletedAt = date( 'Y-m-d' );
        return true;
    }

    public function restore() {
        $this->isDeleted = false;
        $this->deletedAt = null;
        return true;
    }

}
