| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- namespace App\Module\Ulogic\Models;
- use App\Models\ModelCore;
- use App\Module\Ulogic\Enum\PUNISH_TYPE;
- use Illuminate\Database\Eloquent\Relations\HasOne;
- /**
- * 用户 惩罚(违规记录)
- * punish
- *
- * field start
- * @property int $id
- * @property int $user_id 用户ID
- * @property string $type 类型
- * @property \Carbon\Carbon $created_at
- * @property \Carbon\Carbon $updated_at
- * @property string $desc 描述
- * @property int $level 惩罚等级
- * @property \Carbon\Carbon $deleted_at
- * @property int $admin_id 做出惩罚的管理员ID
- * field end
- *
- *
- *
- *
- */
- class UserPunish extends ModelCore
- {
- protected $table = 'user_punishs';
- protected $casts = [
- 'type' => PUNISH_TYPE::class
- ];
- public function user(): HasOne
- {
- return $this->hasOne(\App\Module\User\Model\User::class, 'user_id', 'user_id');
- }
- }
|