package org.dromara.erp.controller;

import lombok.RequiredArgsConstructor;
import org.dromara.common.core.domain.R;
import org.dromara.erp.domain.query.ErpColorKindQuery;
import org.dromara.erp.domain.vo.ErpColorKindVo;
import org.dromara.erp.service.IErpColorKindService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * ERP 颜色种类控制器
 *
 * @Author: Antigravity
 */
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/erp/colorKind")
public class ErpColorKindController {

    private final IErpColorKindService erpColorKindService;

    /**
     * 查询颜色种类列表（按父级ID分级）
     * @Author: Trae
     */
    @GetMapping("/list")
    public R<List<ErpColorKindVo>> list(ErpColorKindQuery query) {
        return R.ok(erpColorKindService.queryList(query));
    }

}
