| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- namespace app\common\model;
- use think\Model;
- class OutResume extends Model
- {
- // 设置字段信息
- protected $schema = [
- 'id' => 'int',
- 'brokerid' => 'int',
- 'name' => 'string',
- 'avatar' => 'string',
- 'mobile' => 'string',
- 'idcard' => 'string',
- 'gender' => 'tinyint',
- 'age' => 'int',
- 'jobintention' => 'string',
- 'address' => 'string',
- 'education' => 'string',
- 'createtime' => 'int',
- 'updatetime' => 'int',
- 'comment' => 'string',
- 'status' => 'int',
- ];
- // 设置字段自动转换类型
- protected $type = [
- 'createtime' => 'timestamp:Y-m-d H:i:s',
- 'updatetime' => 'timestamp:Y-m-d H:i:s',
- ];
- static $status = [1 => '未跟进', 2 => '未面试', 3 => '面试通过', 4 => '面试未通过', 5 => '用户放弃', 6 => '已入职', 7 => '已离职'];
- static $gender = [1 => '男', 2 => '女'];
- public function getStatusTextAttr($value, $data)
- {
- return self::$status[$data['status']];
- }
- public function getGenderTextAttr($value, $data)
- {
- return self::$gender[$data['gender']];
- }
- // 关联Worker
- public function broker()
- {
- return $this->hasOne(Broker::class, "id", "brokerid");
- }
- }
|