package api

import (
	"kra/internal/plugin/announcement/service"

	"gorm.io/gorm"
)

var Api *api

type api struct {
	Info *InfoApi
}

// NewApi 创建API实例
func NewApi(db *gorm.DB) *api {
	svc := service.NewService(db)
	a := &api{
		Info: NewInfoApi(svc.Info),
	}
	Api = a
	return a
}
