OutFollow.php 834 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace app\common\model;
  3. use think\Model;
  4. class OutFollow extends Model
  5. {
  6. // 设置字段信息
  7. protected $schema = [
  8. 'id' => 'int',
  9. 'resume_id' => 'int',
  10. 'status' => 'int',
  11. 'remark' => 'string',
  12. 'createtime' => 'int',
  13. ];
  14. // 设置字段自动转换类型
  15. protected $type = [
  16. 'createtime' => 'timestamp:Y-m-d H:i:s',
  17. ];
  18. public static $status = [1 => '未跟进', 2 => '未面试', 3 => '面试通过', 4 => '面试未通过', 5 => '用户放弃', 6 => '已入职', 7 => '已离职'];
  19. public function getStatusTextAttr($value, $data)
  20. {
  21. return self::$status[$data['status']];
  22. }
  23. // 关联User
  24. public function resume()
  25. {
  26. return $this->hasOne(OutResume::class, "id", "resume_id");
  27. }
  28. }