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.
 
 
 

86 lines
3.6 KiB

<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
/**
* App\BodyStat
*
* @property int $id
* @property string $weight 体重
* @property int $height 身高
* @property string $bmi bmi 指数
* @property string $fat_rate 体脂率
* @property string $body_water_rate 水分
* @property string $bone_mass 骨量
* @property string $metabolism 基础代谢
* @property string $muscle_rate 肌肉量公斤
* @property string $muscle_age 身体年龄
* @property string $protein_ratio 蛋白质百分比
* @property string $stand_body_weight 标准体重
* @property string $visceral_fat 内脏脂肪
* @property string $impedance 阻抗
* @property int $body_score 身体得分
* @property int $body_style 身体类型
* @property string $one_foot_measure_time 单脚测量
* @property string $generated_time 生成时间
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @method static \Illuminate\Database\Eloquent\Builder|BodyStat newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|BodyStat newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|BodyStat query()
* @method static \Illuminate\Database\Eloquent\Builder|BodyStat whereBmi($value)
* @method static \Illuminate\Database\Eloquent\Builder|BodyStat whereBodyScore($value)
* @method static \Illuminate\Database\Eloquent\Builder|BodyStat whereBodyStyle($value)
* @method static \Illuminate\Database\Eloquent\Builder|BodyStat whereBodyWaterRate($value)
* @method static \Illuminate\Database\Eloquent\Builder|BodyStat whereBoneMass($value)
* @method static \Illuminate\Database\Eloquent\Builder|BodyStat whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|BodyStat whereFatRate($value)
* @method static \Illuminate\Database\Eloquent\Builder|BodyStat whereGeneratedTime($value)
* @method static \Illuminate\Database\Eloquent\Builder|BodyStat whereHeight($value)
* @method static \Illuminate\Database\Eloquent\Builder|BodyStat whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|BodyStat whereImpedance($value)
* @method static \Illuminate\Database\Eloquent\Builder|BodyStat whereMetabolism($value)
* @method static \Illuminate\Database\Eloquent\Builder|BodyStat whereMuscleAge($value)
* @method static \Illuminate\Database\Eloquent\Builder|BodyStat whereMuscleRate($value)
* @method static \Illuminate\Database\Eloquent\Builder|BodyStat whereOneFootMeasureTime($value)
* @method static \Illuminate\Database\Eloquent\Builder|BodyStat whereProteinRatio($value)
* @method static \Illuminate\Database\Eloquent\Builder|BodyStat whereStandBodyWeight($value)
* @method static \Illuminate\Database\Eloquent\Builder|BodyStat whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|BodyStat whereVisceralFat($value)
* @method static \Illuminate\Database\Eloquent\Builder|BodyStat whereWeight($value)
* @mixin \Eloquent
*/
class BodyStat extends Model
{
//
protected $fillable = ["*"];
/**
* Get an attribute from the model.
*
* @param string $key
* @return mixed
*/
public function getAttribute($key)
{
if (array_key_exists($key, $this->relations)) {
return parent::getAttribute($key);
} else {
return parent::getAttribute(Str::snake($key));
}
}
/**
* Set a given attribute on the model.
*
* @param string $key
* @param mixed $value
* @return mixed
*/
public function setAttribute($key, $value)
{
return parent::setAttribute(Str::snake($key), $value);
}
}