HumanEnterpriseModel.php 505 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace app\common\model;
  3. class HumanEnterpriseModel extends BaseModel
  4. {
  5. // 设置表名
  6. protected $name = 'human_enterprise';
  7. //自动完成
  8. protected $autoWriteTimestamp = true;
  9. protected $type = [
  10. 'cooperate' => 'array',
  11. ];
  12. // 常量
  13. const STATUS = [1 => '显示', 2 => '隐藏'];
  14. const STATUS_SHOW = 1;
  15. const STATUS_HIDE = 2;
  16. public function getStatusTextAttr($value, $data)
  17. {
  18. return self::STATUS[$data['status']];
  19. }
  20. }