You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
709 B

  1. <?php
  2. namespace App\Model\v3;
  3. use App\Model\Model;
  4. use Hyperf\Database\Model\SoftDeletes;
  5. class User extends Model
  6. {
  7. use SoftDeletes;
  8. protected $table = 'lanzu_user';
  9. protected $fillable = [
  10. 'nick_name',
  11. 'avatar',
  12. 'openid',
  13. 'unionid',
  14. 'country',
  15. 'province',
  16. 'city',
  17. 'gender',
  18. 'language',
  19. ];
  20. protected $visible = [
  21. 'id',
  22. 'nick_name',
  23. 'avatar',
  24. 'openid',
  25. 'unionid',
  26. 'country',
  27. 'province',
  28. 'city',
  29. 'gender',
  30. 'language',
  31. ];
  32. public function community()
  33. {
  34. return $this->hasOne(CsInfo::class, 'user_id', 'id');
  35. }
  36. }