'timestamp:Y-m-d H:i:s', ]; // 软删除 use SoftDelete; protected $deleteTime = 'delete_time'; protected $defaultSoftDelete = 0; // 常量 const STATUS = [1 => '待审核', 2 => '已通过', 3 => '未通过', 4 => '禁用']; const GENDER = ['保密', '男', '女']; const STATUS_WAIT = 1; const STATUS_PASS = 2; const STATUS_FAIL = 3; const STATUS_DISABLE = 4; const GENDER_MAN = 1; const GENDER_WOMAN = 2; public function getStatusTextAttr($value, $data) { return self::STATUS[$data['status']]; } public function getGenderTextAttr($value, $data) { return self::GENDER[$data['gender']]; } }