'隐藏', self::SHOW => '显示' ]; if ($value === true) { return $data; } return $data[$value]; } /** * @notes 启用状态 * @param bool $value * @return string|string[] * @author ljj * @date 2022/2/14 4:02 下午 */ public static function getEnableDesc($value = true) { $data = [ self::HIDE => '停用', self::SHOW => '启用' ]; if ($value === true) { return $data; } return $data[$value]; } /** * @notes 性别 * @param bool $value * @return string|string[] * @author ljj * @date 2022/2/10 11:40 上午 */ public static function getSexDesc($value = true) { $data = [ self::UNKNOWN => '未知', self::MAN => '男', self::WOMAN => '女' ]; if ($value === true) { return $data; } return $data[$value]; } /** * @notes 属性 * @param bool $value * @return string|string[] * @author ljj * @date 2022/2/14 4:41 下午 */ public static function getAttrDesc($value = true) { $data = [ self::SYSTEM => '系统默认', self::CUSTOM => '自定义' ]; if ($value === true) { return $data; } return $data[$value]; } /** * @notes 是否推荐 * @param bool $value * @return string|string[] * @author ljj * @date 2022/2/23 3:30 下午 */ public static function getRecommendDesc($value = true) { $data = [ self::HIDE => '不推荐', self::SHOW => '推荐' ]; if ($value === true) { return $data; } return $data[$value]; } }