import { Controller } from '@nestjs/common'; import { Crud } from "@dataui/crud"; import { CategoryCrudService } from './category-crud.service'; import { ApiTags } from '@nestjs/swagger'; import { Category } from 'kkk-lib/article/entity/category.entity'; @ApiTags('Categories-CRUD') @Crud({ model: { type: Category, }, query: { join: { parent: { eager: true, }, children: { eager: true, }, }, }, }) @Controller('api/a/crud/categories') export class CategoryCrudController { constructor(public service: CategoryCrudService) {} }