ResumeInvite.php 629 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace app\common\model;
  3. use think\Model;
  4. class ResumeInvite extends Model
  5. {
  6. // 设置字段信息
  7. protected $schema = [
  8. 'id' => 'int',
  9. 'workerid' => 'int',
  10. 'userid' => 'int',
  11. 'status' => 'tinyint',
  12. 'remark' => 'string',
  13. 'createtime' => 'int',
  14. ];
  15. // 设置字段自动转换类型
  16. protected $type = [
  17. 'createtime' => 'timestamp:Y-m-d H:i:s',
  18. ];
  19. public function getStatusTextAttr($value, $data)
  20. {
  21. $status = [1 => '邀请中', 2 => '邀请成功'];
  22. return $status[$data['status']];
  23. }
  24. }