1 | <?php |
||
25 | class Username extends BaseBlameableModel |
||
26 | { |
||
27 | public $hostClass = User::class; |
||
28 | |||
29 | public $idAttribute = false; |
||
30 | |||
31 | public $createdByAttribute = 'guid'; |
||
32 | public $updatedByAttribute = false; |
||
33 | |||
34 | public $contentAttributeRule = ['string', 'max' => 32, 'min' => 2]; |
||
35 | |||
36 | public static $regex = '/^\w{2,32}$/'; |
||
37 | |||
38 | /** |
||
39 | * @return array |
||
40 | */ |
||
41 | public function rules() |
||
48 | |||
49 | /** |
||
50 | * @return string |
||
51 | */ |
||
52 | public function __toString() |
||
56 | } |
||
57 |