1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- namespace app\model;
- use think\Model;
- class ActivitySign extends Model
- {
- /**
- * 二维码地址
- */
- public function getQrcodeAttr($value)
- {
- if (empty($value)) return $value;
- $ali_oss_bindurl = config('app.ali_oss_bindurl');
- $url = 'http://' . $ali_oss_bindurl . '/' . $value;
- return $url;
- }
- /**
- * 客户信息
- */
- public function user()
- {
- return $this->belongsTo(User::class, 'uid','id');
- }
- /**
- * 活动信息
- */
- public function activity()
- {
- return $this->belongsTo(Activity::class, 'aid','id');
- }
- /**
- * 业务员信息
- */
- public function employee()
- {
- return $this->belongsTo(Employee::class, 'share_employee_id','id');
- }
- }
|