fuser repository & correct annotations
This commit is contained in:
parent
acdd0d3fb1
commit
f2c8e79116
3 changed files with 154 additions and 67 deletions
36
intaro.retailcrm/lib/model/bitrix/fuser.php
Normal file
36
intaro.retailcrm/lib/model/bitrix/fuser.php
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
/**
|
||||
* PHP version 7.1
|
||||
*
|
||||
* @category Integration
|
||||
* @package Intaro\RetailCrm\Model\Bitrix
|
||||
* @author retailCRM <integration@retailcrm.ru>
|
||||
* @license MIT
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://retailcrm.ru/docs
|
||||
*/
|
||||
namespace Intaro\RetailCrm\Model\Bitrix;
|
||||
|
||||
use Bitrix\Main\Type\DateTime;
|
||||
|
||||
/**
|
||||
* Class Fuser
|
||||
*
|
||||
* @package Intaro\RetailCrm\Model\Bitrix
|
||||
*
|
||||
* @method int getId()
|
||||
* @method void setId(int $id)
|
||||
* @method DateTime getDateInsert()
|
||||
* @method void setDateInsert(DateTime $dateInsert)
|
||||
* @method DateTime getDateIns()
|
||||
* @method void setDateIns(DateTime $dateIns)
|
||||
* @method DateTime getDateUpdate()
|
||||
* @method void setDateUpdate(DateTime $dateUpdate)
|
||||
* @method DateTime getDateUpd()
|
||||
* @method void setDateUpd(DateTime $dateUpd)
|
||||
* @method mixed getUser()
|
||||
* @method void setUser($user)
|
||||
*/
|
||||
class Fuser extends AbstractModelFacade
|
||||
{
|
||||
}
|
|
@ -19,127 +19,127 @@ use Bitrix\Main\Type\DateTime;
|
|||
* @package Intaro\RetailCrm\Model\Bitrix
|
||||
*
|
||||
* @method int getId()
|
||||
* @method void setId()
|
||||
* @method void setId(int $id)
|
||||
* @method string getLogin()
|
||||
* @method void setLogin()
|
||||
* @method void setLogin(string $login)
|
||||
* @method string getPassword()
|
||||
* @method void setPassword()
|
||||
* @method void setPassword(string $password)
|
||||
* @method string getEmail()
|
||||
* @method void setEmail()
|
||||
* @method void setEmail(string $email)
|
||||
* @method bool getActive()
|
||||
* @method void setActive()
|
||||
* @method void setActive(bool $active)
|
||||
* @method DateTime getDateRegister()
|
||||
* @method void setDateRegister()
|
||||
* @method void setDateRegister(DateTime $dateRegister)
|
||||
* @method DateTime getDateRegShort()
|
||||
* @method void setDateRegShort()
|
||||
* @method void setDateRegShort(DateTime $dateRegShort)
|
||||
* @method DateTime getLastLogin()
|
||||
* @method void setLastLogin()
|
||||
* @method void setLastLogin(DateTime $lastLogin)
|
||||
* @method DateTime getLastLoginShort()
|
||||
* @method void setLastLoginShort()
|
||||
* @method void setLastLoginShort(DateTime $lastLoginShort)
|
||||
* @method DateTime getLastActivityDate()
|
||||
* @method void setLastActivityDate()
|
||||
* @method void setLastActivityDate(DateTime $lastActivityDate)
|
||||
* @method DateTime getTimestampX()
|
||||
* @method void setTimestampX()
|
||||
* @method void setTimestampX(DateTime $timestampX)
|
||||
* @method string getName()
|
||||
* @method void setName()
|
||||
* @method void setName(string $name)
|
||||
* @method string getSecondName()
|
||||
* @method void setSecondName()
|
||||
* @method void setSecondName(string $secondName)
|
||||
* @method string getLastName()
|
||||
* @method void setLastName()
|
||||
* @method void setLastName(string $lastName)
|
||||
* @method string getTitle()
|
||||
* @method void setTitle()
|
||||
* @method void setTitle(string $title)
|
||||
* @method string getExternalAuthId()
|
||||
* @method void setExternalAuthId()
|
||||
* @method void setExternalAuthId(string $externalAuthId)
|
||||
* @method string getXmlId()
|
||||
* @method void setXmlId()
|
||||
* @method void setXmlId(string $xmlId)
|
||||
* @method string getBxUserId()
|
||||
* @method void setBxUserId()
|
||||
* @method void setBxUserId(string $bxUserId)
|
||||
* @method string getConfirmCode()
|
||||
* @method void setConfirmCode()
|
||||
* @method void setConfirmCode(string $confirmCode)
|
||||
* @method string getLid()
|
||||
* @method void setLid()
|
||||
* @method void setLid(string $lid)
|
||||
* @method string getLanguageId()
|
||||
* @method void setLanguageId()
|
||||
* @method void setLanguageId(string $languageId)
|
||||
* @method int getTimeZoneOffset()
|
||||
* @method void setTimeZoneOffset()
|
||||
* @method void setTimeZoneOffset(int $timeZoneOffset)
|
||||
* @method string getPersonalProfession()
|
||||
* @method void setPersonalProfession()
|
||||
* @method void setPersonalProfession(string $personalProfession)
|
||||
* @method string getPersonalPhone()
|
||||
* @method void setPersonalPhone()
|
||||
* @method void setPersonalPhone(string $personalPhone)
|
||||
* @method string getPersonalMobile()
|
||||
* @method void setPersonalMobile()
|
||||
* @method void setPersonalMobile(string $personalMobile)
|
||||
* @method string getPersonalWww()
|
||||
* @method void setPersonalWww()
|
||||
* @method void setPersonalWww(string $personalWww)
|
||||
* @method string getPersonalIcq()
|
||||
* @method void setPersonalIcq()
|
||||
* @method void setPersonalIcq(string $personalIcq)
|
||||
* @method string getPersonalFax()
|
||||
* @method void setPersonalFax()
|
||||
* @method void setPersonalFax(string $personalFax)
|
||||
* @method string getPersonalPager()
|
||||
* @method void setPersonalPager()
|
||||
* @method mixed getPersonalStreet()
|
||||
* @method void setPersonalStreet()
|
||||
* @method void setPersonalPager(string $personalPager)
|
||||
* @method string getPersonalStreet()
|
||||
* @method void setPersonalStreet(string $personalStreet)
|
||||
* @method string getPersonalMailbox()
|
||||
* @method void setPersonalMailbox()
|
||||
* @method void setPersonalMailbox(string $personalMailbox)
|
||||
* @method string getPersonalCity()
|
||||
* @method void setPersonalCity()
|
||||
* @method void setPersonalCity(string $personalCity)
|
||||
* @method string getPersonalState()
|
||||
* @method void setPersonalState()
|
||||
* @method void setPersonalState(string $personalState)
|
||||
* @method string getPersonalZip()
|
||||
* @method void setPersonalZip()
|
||||
* @method void setPersonalZip(string $personalZip)
|
||||
* @method string getPersonalCountry()
|
||||
* @method void setPersonalCountry()
|
||||
* @method void setPersonalCountry(string $personalCountry)
|
||||
* @method DateTime getPersonalBirthday()
|
||||
* @method void setPersonalBirthday()
|
||||
* @method void setPersonalBirthday(DateTime $personalBirthday)
|
||||
* @method string getPersonalGender()
|
||||
* @method void setPersonalGender()
|
||||
* @method void setPersonalGender(string $personalGender)
|
||||
* @method int getPersonalPhoto()
|
||||
* @method void setPersonalPhoto()
|
||||
* @method mixed getPersonalNotes()
|
||||
* @method void setPersonalNotes()
|
||||
* @method void setPersonalPhoto(int $personalPhoto)
|
||||
* @method string getPersonalNotes()
|
||||
* @method void setPersonalNotes(string $personalNotes)
|
||||
* @method string getWorkCompany()
|
||||
* @method void setWorkCompany()
|
||||
* @method void setWorkCompany(string $workCompany)
|
||||
* @method string getWorkDepartment()
|
||||
* @method void setWorkDepartment()
|
||||
* @method void setWorkDepartment(string $workDepartment)
|
||||
* @method string getWorkPhone()
|
||||
* @method void setWorkPhone()
|
||||
* @method void setWorkPhone(string $workPhone)
|
||||
* @method string getWorkPosition()
|
||||
* @method void setWorkPosition()
|
||||
* @method void setWorkPosition(string $workPosition)
|
||||
* @method string getWorkWww()
|
||||
* @method void setWorkWww()
|
||||
* @method void setWorkWww(string $workWww)
|
||||
* @method string getWorkFax()
|
||||
* @method void setWorkFax()
|
||||
* @method void setWorkFax(string $workFax)
|
||||
* @method string getWorkPager()
|
||||
* @method void setWorkPager()
|
||||
* @method mixed getWorkStreet()
|
||||
* @method void setWorkStreet()
|
||||
* @method void setWorkPager(string $workPager)
|
||||
* @method string getWorkStreet()
|
||||
* @method void setWorkStreet(string $workStreet)
|
||||
* @method string getWorkMailbox()
|
||||
* @method void setWorkMailbox()
|
||||
* @method void setWorkMailbox(string $workMailbox)
|
||||
* @method string getWorkCity()
|
||||
* @method void setWorkCity()
|
||||
* @method void setWorkCity(string $workCity)
|
||||
* @method string getWorkState()
|
||||
* @method void setWorkState()
|
||||
* @method void setWorkState(string $workState)
|
||||
* @method string getWorkZip()
|
||||
* @method void setWorkZip()
|
||||
* @method void setWorkZip(string $workZip)
|
||||
* @method string getWorkCountry()
|
||||
* @method void setWorkCountry()
|
||||
* @method mixed getWorkProfile()
|
||||
* @method void setWorkProfile()
|
||||
* @method void setWorkCountry(string $workCountry)
|
||||
* @method string getWorkProfile()
|
||||
* @method void setWorkProfile(string $workProfile)
|
||||
* @method int getWorkLogo()
|
||||
* @method void setWorkLogo()
|
||||
* @method mixed getWorkNotes()
|
||||
* @method void setWorkNotes()
|
||||
* @method mixed getAdminNotes()
|
||||
* @method void setAdminNotes()
|
||||
* @method void setWorkLogo(int $workLogo)
|
||||
* @method string getWorkNotes()
|
||||
* @method void setWorkNotes(string $workNotes)
|
||||
* @method string getAdminNotes()
|
||||
* @method void setAdminNotes(string $adminNotes)
|
||||
* @method string getShortName()
|
||||
* @method void setShortName()
|
||||
* @method void setShortName(string $shortName)
|
||||
* @method bool getIsOnline()
|
||||
* @method void setIsOnline()
|
||||
* @method void setIsOnline(bool $isOnline)
|
||||
* @method bool getIsRealUser()
|
||||
* @method void setIsRealUser()
|
||||
* @method void setIsRealUser(bool $isRealUser)
|
||||
* @method mixed getIndex()
|
||||
* @method void setIndex()
|
||||
* @method void setIndex($index)
|
||||
* @method mixed getIndexSelector()
|
||||
* @method void setIndexSelector()
|
||||
* @method void setIndexSelector($indexSelector)
|
||||
*/
|
||||
class User extends AbstractModelFacade
|
||||
{
|
||||
|
|
51
intaro.retailcrm/lib/repository/fuserrepository.php
Normal file
51
intaro.retailcrm/lib/repository/fuserrepository.php
Normal file
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
/**
|
||||
* PHP version 7.1
|
||||
*
|
||||
* @category Integration
|
||||
* @package Intaro\RetailCrm\Model\Api
|
||||
* @author retailCRM <integration@retailcrm.ru>
|
||||
* @license MIT
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://retailcrm.ru/docs
|
||||
*/
|
||||
namespace Intaro\RetailCrm\Repository;
|
||||
|
||||
use Bitrix\Sale\FuserTable;
|
||||
use Intaro\RetailCrm\Model\Bitrix\Fuser;
|
||||
use Bitrix\Main\ORM\Objectify\EntityObject;
|
||||
|
||||
/**
|
||||
* Class FuserRepository
|
||||
*
|
||||
* @package Intaro\RetailCrm\Repository
|
||||
*/
|
||||
class FuserRepository extends AbstractRepository
|
||||
{
|
||||
/**
|
||||
* @param int $id
|
||||
*
|
||||
* @return Fuser|null
|
||||
* @throws \Bitrix\Main\ArgumentException
|
||||
* @throws \Bitrix\Main\ObjectPropertyException
|
||||
* @throws \Bitrix\Main\SystemException
|
||||
*/
|
||||
public static function getById(int $id): ?Fuser
|
||||
{
|
||||
return static::getWrapped(FuserTable::getByPrimary($id)->fetchObject());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Bitrix\Main\ORM\Objectify\EntityObject|null $entityObject
|
||||
*
|
||||
* @return \Intaro\RetailCrm\Model\Bitrix\Fuser|null
|
||||
*/
|
||||
private static function getWrapped(?EntityObject $entityObject): ?Fuser
|
||||
{
|
||||
if (null === $entityObject) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return new Fuser($entityObject);
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue