1 | <?php |
||
37 | class Member extends BaseBlameableModel |
||
38 | { |
||
39 | public $createdByAttribute = 'organization_guid'; |
||
40 | public $updatedByAttribute = false; |
||
41 | public $hostClass = Organization::class; |
||
42 | |||
43 | public $memberAttribute = 'user_guid'; |
||
44 | public $memberUserClass = User::class; |
||
45 | private $noInitMemberUser; |
||
46 | /** |
||
47 | * @return User |
||
48 | */ |
||
49 | protected function getNoInitMemberUser() |
||
57 | |||
58 | /** |
||
59 | * @inheritdoc |
||
60 | */ |
||
61 | public function init() |
||
71 | |||
72 | public $descriptionAttribute = 'description'; |
||
73 | |||
74 | public function getMemberUserRules() |
||
81 | |||
82 | public function getMemberRoleRules() |
||
88 | |||
89 | /** |
||
90 | * Set member user. |
||
91 | * @param User|string|integer $user |
||
92 | */ |
||
93 | public function setMemberUser($user) |
||
104 | |||
105 | public function getMemberUser() |
||
109 | |||
110 | /** |
||
111 | * Get Organization Query. |
||
112 | * Alias of `getHost` method. |
||
113 | * @return OrganizationQuery |
||
114 | */ |
||
115 | public function getOrganization() |
||
119 | |||
120 | /** |
||
121 | * Set Organization. |
||
122 | * @param BaseOrganization $organization |
||
123 | * @return boolean |
||
124 | */ |
||
125 | public function setOrganization($organization) |
||
129 | |||
130 | public function rules() |
||
134 | |||
135 | /** |
||
136 | * @inheritdoc |
||
137 | */ |
||
138 | public static function tableName() |
||
142 | } |
||
143 |