AppointmentApplication.php 601 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace app\common\model;
  3. use think\Model;
  4. class AppointmentApplication extends Model
  5. {
  6. protected $updateTime = false;
  7. const STATUS_NOT_SIGN = 0;
  8. const STATUS_SIGN = 1;
  9. const STATUS_NOT_COME = 2;
  10. //finish_time
  11. public function getFinishTimeAttr($value, $data)
  12. {
  13. return $value ? date('Y-m-d H:i:s', $value) : '';
  14. }
  15. //关联地址
  16. public function address()
  17. {
  18. return $this->belongsTo('Address');
  19. }
  20. //关联专家
  21. public function specialist()
  22. {
  23. return $this->belongsTo('Specialist', 'provider_id');
  24. }
  25. }