<?php


namespace App\Models;


class UserInfoModel extends BaseModel
{
    protected $table = 'users_info';
    public $timestamps = false;
    protected $primaryKey="user_id";
    protected $fillable = ['user_id','weixin', 'nickname','avatar','birthday','height','weight','work','info','figure','feeling','education','income','drink','smoke','hobby','photo','video'];

    protected $appends = ['age'];

    //年龄
    public function getAgeAttribute(){
        return !empty($this->attributes['birthday'])?birthday($this->attributes['birthday']):0;
    }

}
