DataUserApplyJobInfo.php 922 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace app\data\model;
  3. use think\admin\Model;
  4. use think\db\Query;
  5. /**
  6. * 用户应聘信息模型
  7. * Class DataUserApplyJobInfo
  8. * @package app\data\model
  9. */
  10. class DataUserApplyJobInfo extends Model
  11. {
  12. /**
  13. * 格式化创建时间
  14. * @param string $value
  15. * @return string
  16. */
  17. public function getCreateAtAttr(string $value): string
  18. {
  19. return format_datetime($value);
  20. }
  21. public function workexperience(){
  22. return $this->hasMany(DataUserApplyJobInfoChild::class,'info_id')->where('type',1);
  23. }
  24. public function professionalskills(){
  25. return $this->hasMany(DataUserApplyJobInfoChild::class,'info_id')->where('type',2);
  26. }
  27. public function certificate(){
  28. return $this->hasMany(DataUserApplyJobInfoChild::class,'info_id')->where('type',3);
  29. }
  30. public function user(){
  31. return $this->belongsTo(DataUser::class,'uuid');
  32. }
  33. }