| 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]; |
||
| 35 | |||
| 36 | public static $regex = '/^\w{2,32}$/'; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @return array |
||
| 40 | */ |
||
| 41 | 4 | public function rules() |
|
| 47 | |||
| 48 | /** |
||
| 49 | * @return string |
||
| 50 | */ |
||
| 51 | 3 | public function __toString() |
|
| 55 | } |
||
| 56 |