package routers

import (
	"github.com/gin-gonic/gin"

	v1 "application/api/v1"
)

// InitRouter 初始化路由信息
func InitRouter() *gin.Engine {
	r := gin.Default()

	apiV1 := r.Group("/api/v1")
	{
		apiV1.GET("/hello", v1.Hello)
		//查询账号列表信息
		apiV1.POST("/queryAccountList", v1.QueryAccountList)
		//创建真实房产信息
		apiV1.POST("/createRealEstate", v1.CreateRealEstate)
		apiV1.POST("/queryRealEstateList", v1.QueryRealEstateList)
		apiV1.POST("/createSelling", v1.CreateSelling)
		apiV1.POST("/createSellingByBuy", v1.CreateSellingByBuy)
		apiV1.POST("/querySellingList", v1.QuerySellingList)
		apiV1.POST("/querySellingListByBuyer", v1.QuerySellingListByBuyer)
		apiV1.POST("/updateSelling", v1.UpdateSelling)
		apiV1.POST("/createDonating", v1.CreateDonating)
		apiV1.POST("/queryDonatingList", v1.QueryDonatingList)
		apiV1.POST("/queryDonatingListByGrantee", v1.QueryDonatingListByGrantee)
		apiV1.POST("/updateDonating", v1.UpdateDonating)

		//秒杀
		//apiV1.POST("/secKill", v1.SecKill)
		//apiV1.POST("/stockHot", v1.StockHot)
		//支付

		//公安局的不良信息添加
		apiV1.POST("/badRecordAdd", v1.BadRecordAdd)

		//公安局-根据身份证号查询用户最新的不良记录
		apiV1.GET("/queryBadRecordLatestByIdCard", v1.QueryBadRecordLatestByIdCard)

		//公安局-根据身份证号查询历史的不良记录信息
		apiV1.GET("/queryBadRecordListByIdCard", v1.QueryBadRecordListByIdCard)
	}
	return r
}
