package com.ruoyi.applet.contoller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.model.service.IAppPetTypeService;
import com.ruoyi.model.service.IAppPetsBreadService;
import com.ruoyi.model.service.IAppPetsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(description = "宠物信息")
@RestController
@RequestMapping("/applet/pets")
public class AppletAppPetsController extends BaseController {
    @Autowired
    private IAppPetsService appPetsService;

    @ApiOperation("查询所有宠物信息列表")
    @GetMapping("/getAppPetsList")
    public TableDataInfo getAppPetsList(){
        return getDataTable(appPetsService.getAppPetsList());
    }

    @Autowired
    private IAppPetTypeService appPetTypeService;

    @ApiOperation("查询宠物所有类型")
    @GetMapping("/getAppPetTypeList")
    public TableDataInfo getAppPetTypeList(){
        return getDataTable(appPetTypeService.getAppPetTypeList());
    }

    @Autowired
    private IAppPetsBreadService appPetsBreadService;

    @ApiOperation("查询宠物所有品种")
    @GetMapping("/getAppPetsBreadList")
    public TableDataInfo getAppPetsBreadList(){
        return getDataTable(appPetsBreadService.getAppPetsBreadList());
    }
}
