HumanInstitutionApplyModel.php 817 B

12345678910111213141516171819202122232425262728293031323334353637
  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. 'images' => 'array',
  11. ];
  12. // 常量
  13. const STATUS = [1 => '待审核', 2 => '审核通过', 3 => '审核不通过'];
  14. const IS_ARRIVE = [1 => '已签到', 2 => '未签到'];
  15. const STATUS_WAIT = 1;
  16. const STATUS_PASS = 2;
  17. const STATUS_DISABLED = 3;
  18. const IS_ARRIVE_YES = 1;
  19. const IS_ARRIVE_NO = 1;
  20. public function getStatusTextAttr($value, $data)
  21. {
  22. return self::STATUS[$data['status']];
  23. }
  24. public function getIsArriveTextAttr($value, $data)
  25. {
  26. return self::IS_ARRIVE[$data['is_arrive']];
  27. }
  28. }