HumanInstitutionApplyModel.php 852 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace app\common\model;
  3. class HumanInstitutionApplyModel extends BaseModel
  4. {
  5. // 设置表名
  6. protected $name = 'human_institution_apply';
  7. //自动完成
  8. protected $autoWriteTimestamp = true;
  9. protected $type = [
  10. 'cooperate' => 'array',
  11. 'images' => 'array',
  12. ];
  13. // 常量
  14. const STATUS = [1 => '待审核', 2 => '审核通过', 3 => '审核不通过'];
  15. const IS_ARRIVE = [1 => '已签到', 2 => '未签到'];
  16. const STATUS_WAIT = 1;
  17. const STATUS_PASS = 2;
  18. const STATUS_DISABLED = 3;
  19. const IS_ARRIVE_YES = 1;
  20. const IS_ARRIVE_NO = 1;
  21. public function getStatusTextAttr($value, $data)
  22. {
  23. return self::STATUS[$data['status']];
  24. }
  25. public function getIsArriveTextAttr($value, $data)
  26. {
  27. return self::IS_ARRIVE[$data['is_arrive']];
  28. }
  29. }