1234567891011121314151617181920212223242526272829303132 |
- <?php
- namespace app\common\model;
- use think\Model;
- class AppointmentApplication extends Model
- {
- protected $updateTime = false;
- const STATUS_NOT_SIGN = 0;
- const STATUS_SIGN = 1;
- const STATUS_NOT_COME = 2;
- //finish_time
- public function getFinishTimeAttr($value, $data)
- {
- return $value ? date('Y-m-d H:i:s', $value) : '';
- }
- //关联地址
- public function address()
- {
- return $this->belongsTo('Address');
- }
- //关联专家
- public function specialist()
- {
- return $this->belongsTo('Specialist', 'provider_id');
- }
- }
|