<?php namespace App\Entity; use \App\Models\Groups; class User { protected static $tablename = "user"; use \libs\DataContain; use \libs\DataStorage; public function __construct() { $this -> set_fields([ "name", "passhash", "create_at" ]); } public function get_groups() :Array { return (new Groups()) -> get_groups_by_user_id($this -> get_id()); } }