123456789101112131415161718192021222324252627 |
- <?php
- namespace app\model;
- use think\Model;
- class EmployeeCard extends Model
- {
- public function getQrcodeAttr($value)
- {
- if(empty($value)) return $value;
- $domain = config('app.ali_oss_bindurl');
- return 'https://'.$domain.'/'.$value;
- }
- public function getHeadimgurlAttr($value)
- {
- if(empty($value)) return $value;
- $domain = config('app.ali_oss_bindurl');
- return 'https://'.$domain.'/'.$value;
- }
-
- public function employee()
- {
- return $this->belongsTo(Employee::class, 'employee_id')->bind(['uid']);
- }
- }
|