package com.enterprise.manage.modules.system.controller;

import com.enterprise.manage.common.base.BaseController;
import com.enterprise.manage.common.constant.ControllerConstant;
import com.enterprise.manage.common.constant.emuns.InstitutionNature;
import com.enterprise.manage.common.web.response.Result;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author : wangqingli
 * @Description: 简要功能描述
 * @date 2023-12-04-10:28
 * @modify by：wangqingli
 */
@RestController
@RequestMapping(ControllerConstant.SYSTEM + "constant/v1")
public class ConstantController extends BaseController {

    @GetMapping("institution")
    @PreAuthorize("hasPermission('','sys:institution:main')")
    public Result getInstitution(@PathVariable String type) {
        return success(InstitutionNature.getLabelEnumList());
    }

}
