package com.ruoyi.web.primary.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.web.primary.entity.DatabaseMetadata;
import com.ruoyi.web.primary.service.IDatabaseMetadataService;
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;

import static com.ruoyi.common.core.domain.AjaxResult.success;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2025-11-25
 */
@RestController
@RequestMapping("/database-metadata")
public class DatabaseMetadataController {
    @Autowired
    private IDatabaseMetadataService metadataService;
    @GetMapping("/list/list")
    public AjaxResult listVillageSpecialByPage() {
        return success(metadataService.list(new QueryWrapper<DatabaseMetadata>()
                .eq("db_status",1).select("db_name , username,version,version_name")));
    }
}
