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.

34 lines
573 B

5 years ago
5 years ago
5 years ago
5 years ago
  1. <?php
  2. namespace App\Model\v3;
  3. use App\Model\Model;
  4. use Hyperf\Database\Model\SoftDeletes;
  5. class UserAddress extends Model
  6. {
  7. use SoftDeletes;
  8. protected $table = 'lanzu_user_address';
  9. protected $fillable = [
  10. 'id',
  11. 'user_id',
  12. 'user_name',
  13. 'address',
  14. 'doorplate',
  15. 'gender',
  16. 'lat',
  17. 'lng',
  18. 'tel',
  19. 'tags'
  20. ];
  21. protected $casts = [
  22. 'tags' => 'array'
  23. ];
  24. public function setTagsAttribute($value)
  25. {
  26. return json_encode(json_decode($value, true));
  27. }
  28. }