12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php
- declare(strict_types=1);
- namespace app\model;
- use think\Model;
- /**
- * @mixin \think\Model
- */
- class ActivityCustomerExportLog extends Model
- {
- /**
- * 关联部门
- */
- public function org()
- {
- return $this->belongsTo(Org::class);
- }
- /**
- * 关联操作人
- */
- public function employee()
- {
- return $this->belongsTo(Employee::class, 'op_employee');
- }
- /**
- * type
- */
- public function getTypeAttr($value)
- {
- $types = ['已邀约', '已到店', '已到场', '已交定', '已签单'];
- return $types[$value];
- }
- /**
- * 文件名
- */
- public function getFileAttr($value)
- {
- return 'https://'.config('app.ali_oss_bindurl').'/'.'activityExport/' . $value . '.csv';
- }
- }
|