. */ namespace SP\DataModel; defined('APP_ROOT') || die(); /** * Class GroupAccountsData * * @package SP\DataModel */ class AccountToUserGroupData extends DataModelBase { /** * @var int */ public $userGroupId = 0; /** * @var int */ public $accountId = 0; /** * @var array */ protected $groups = []; /** * @return int */ public function getUserGroupId() { return $this->userGroupId; } /** * @param int $userGroupId */ public function setUserGroupId($userGroupId) { $this->userGroupId = $userGroupId; } /** * @return int */ public function getAccountId() { return $this->accountId; } /** * @param int $accountId */ public function setAccountId($accountId) { $this->accountId = $accountId; } /** * @return array */ public function getGroups() { return $this->groups; } /** * @param array $groups */ public function setGroups(array $groups) { $this->groups = $groups; } /** * @param int $group */ public function addGroup($group) { $this->groups[] = (int)$group; } }