123456789101112131415161718192021222324252627 |
- <?php
- namespace catchAdmin\wind\model\get;
- use catchAdmin\system\model\SysDictData;
- use think\facade\Db;
- trait FanGet
- {
- public function getWindNameAttr()
- {
- $wind_id = $this->wind_id;
- $wind_name = Db::name('wind')->where('id',$wind_id)->value('name');
- return $wind_name;
- }
- public function getModelNameAttr()
- {
- $id = $this->fan_model;
- $name = Db::name('device_mold')->where('id',$id)->where('device_type',4)->value('name');
- return $name;
- }
- public function getFanModelAttr($value)
- {
- return (int)$value;
- }
- }
|