package com.izouma.nineth.web.mobile.open.v1;


import com.izouma.nineth.domain.CollectionCategory;
import com.izouma.nineth.service.collection.CollectionCategoryService;
import com.izouma.nineth.web.BaseController;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 藏品目录表
 *
 * @author ZouYuHong
 */
@RestController
@RequestMapping("/collectionCategory/v1")
@AllArgsConstructor
public class CollectionCategoryControllerOpenV1{
    private CollectionCategoryService collectionCategoryService;



    @PostMapping("/categories")
    public List<CollectionCategory> categories(@RequestBody CollectionCategory params) {
        return collectionCategoryService.categories(params.getProjectId());
    }

}