1 | <?php |
||
35 | abstract class Invitation extends BaseBlameableModel |
||
36 | { |
||
37 | public $hostClass = User::class; |
||
38 | public $idAttribute = false; |
||
39 | public $updatedAtAttribute = false; |
||
40 | /** |
||
41 | * @var array The content field in the data table should be an integer. |
||
42 | */ |
||
43 | public $contentAttributeRule = ['integer']; |
||
44 | /** |
||
45 | * @var bool Whether to allow to send invitation to the same invitee repeatedly. |
||
46 | */ |
||
47 | public $allowRepeated = true; |
||
48 | |||
49 | /** |
||
50 | * @return array |
||
51 | */ |
||
52 | 3 | public function getInviteeRules() |
|
67 | |||
68 | /** |
||
69 | * @return array |
||
70 | */ |
||
71 | 3 | public function rules() |
|
75 | |||
76 | /** |
||
77 | * @param User|string $invitee |
||
78 | * @return string |
||
79 | */ |
||
80 | 3 | public function setInvitee($invitee) |
|
87 | |||
88 | /** |
||
89 | * @return User |
||
90 | */ |
||
91 | 2 | public function getInvitee() |
|
96 | |||
97 | /** |
||
98 | * @param User|string $invitee |
||
99 | * @return BaseBlameableQuery |
||
100 | */ |
||
101 | public static function findByInvitee($invitee) |
||
105 | |||
106 | /** |
||
107 | * @return string |
||
108 | */ |
||
109 | 4 | public static function tableName() |
|
113 | } |
||
114 |