初始化
This commit is contained in:
176
api/admin/v1/admin.go
Normal file
176
api/admin/v1/admin.go
Normal file
@@ -0,0 +1,176 @@
|
||||
package v1
|
||||
|
||||
import "github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
// LoginReq 是后台管理员登录请求。
|
||||
type LoginReq struct {
|
||||
g.Meta `path:"/api/admin/login" tags:"后台" method:"post" summary:"后台管理员登录"`
|
||||
Account string `json:"account" dc:"账号"`
|
||||
Password string `json:"password" dc:"密码"`
|
||||
}
|
||||
|
||||
type LoginRes struct{}
|
||||
|
||||
// MenuTreeReq 是后台菜单树请求。
|
||||
type MenuTreeReq struct {
|
||||
g.Meta `path:"/api/admin/menus/tree" tags:"后台菜单" method:"get" summary:"获取后台菜单树"`
|
||||
}
|
||||
|
||||
type MenuTreeRes struct{}
|
||||
|
||||
// MenuLayoutReq 是后台菜单布局请求。
|
||||
type MenuLayoutReq struct {
|
||||
g.Meta `path:"/api/admin/profile/menu-layout" tags:"后台菜单" method:"get" summary:"获取管理员菜单布局"`
|
||||
}
|
||||
|
||||
type MenuLayoutRes struct{}
|
||||
|
||||
// UpdateMenuLayoutReq 是后台菜单布局更新请求。
|
||||
type UpdateMenuLayoutReq struct {
|
||||
g.Meta `path:"/api/admin/profile/menu-layout" tags:"后台菜单" method:"post" summary:"更新管理员菜单布局"`
|
||||
MenuLayout string `json:"menu_layout" dc:"菜单布局 single单列 double双列"`
|
||||
}
|
||||
|
||||
type UpdateMenuLayoutRes struct{}
|
||||
|
||||
// RolesReq 是后台角色列表请求。
|
||||
type RolesReq struct {
|
||||
g.Meta `path:"/api/admin/roles" tags:"后台角色" method:"get" summary:"获取角色列表"`
|
||||
}
|
||||
|
||||
type RolesRes struct{}
|
||||
|
||||
// SaveRoleMenusReq 是角色菜单授权保存请求。
|
||||
type SaveRoleMenusReq struct {
|
||||
g.Meta `path:"/api/admin/roles/menu" tags:"后台角色" method:"post" summary:"保存角色菜单授权"`
|
||||
RoleId int `json:"role_id" dc:"角色ID"`
|
||||
MenuIds []int `json:"menu_ids" dc:"菜单ID列表"`
|
||||
}
|
||||
|
||||
type SaveRoleMenusRes struct{}
|
||||
|
||||
// SitePagesReq 获取页面配置列表。
|
||||
type SitePagesReq struct {
|
||||
g.Meta `path:"/api/admin/site/pages" tags:"后台官网" method:"get" summary:"获取官网页面配置"`
|
||||
}
|
||||
|
||||
type SitePagesRes struct{}
|
||||
|
||||
// SaveSitePageReq 保存页面 SEO/GSO 配置。
|
||||
type SaveSitePageReq struct {
|
||||
g.Meta `path:"/api/admin/site/pages" tags:"后台官网" method:"post" summary:"保存官网页面配置"`
|
||||
Id int `json:"id" dc:"页面ID"`
|
||||
Code string `json:"code" dc:"页面编码"`
|
||||
Title string `json:"title" dc:"页面标题"`
|
||||
SeoTitle string `json:"seo_title" dc:"SEO标题"`
|
||||
SeoKeywords string `json:"seo_keywords" dc:"SEO关键词"`
|
||||
SeoDescription string `json:"seo_description" dc:"SEO描述"`
|
||||
GsoContent map[string]interface{} `json:"gso_content" dc:"GSO/GEO内容"`
|
||||
Status int `json:"status" dc:"状态"`
|
||||
Sort int `json:"sort" dc:"排序"`
|
||||
}
|
||||
|
||||
type SaveSitePageRes struct{}
|
||||
|
||||
// SiteSectionsReq 获取官网页面模块。
|
||||
type SiteSectionsReq struct {
|
||||
g.Meta `path:"/api/admin/site/sections" tags:"后台官网" method:"get" summary:"获取官网页面模块"`
|
||||
PageCode string `json:"page_code" dc:"页面编码"`
|
||||
}
|
||||
|
||||
type SiteSectionsRes struct{}
|
||||
|
||||
// SaveSiteSectionReq 保存官网页面模块。
|
||||
type SaveSiteSectionReq struct {
|
||||
g.Meta `path:"/api/admin/site/sections" tags:"后台官网" method:"post" summary:"保存官网页面模块"`
|
||||
Id int `json:"id" dc:"模块ID"`
|
||||
PageCode string `json:"page_code" dc:"页面编码"`
|
||||
SectionKey string `json:"section_key" dc:"模块标识"`
|
||||
Title string `json:"title" dc:"模块标题"`
|
||||
Subtitle string `json:"subtitle" dc:"模块副标题"`
|
||||
Content map[string]interface{} `json:"content" dc:"模块内容JSON"`
|
||||
Status int `json:"status" dc:"状态"`
|
||||
Sort int `json:"sort" dc:"排序"`
|
||||
}
|
||||
|
||||
type SaveSiteSectionRes struct{}
|
||||
|
||||
// SiteMediaReq 获取官网素材列表。
|
||||
type SiteMediaReq struct {
|
||||
g.Meta `path:"/api/admin/site/media" tags:"后台官网" method:"get" summary:"获取官网素材"`
|
||||
MediaType string `json:"media_type" dc:"素材类型"`
|
||||
}
|
||||
|
||||
type SiteMediaRes struct{}
|
||||
|
||||
// SaveSiteMediaReq 保存官网素材。
|
||||
type SaveSiteMediaReq struct {
|
||||
g.Meta `path:"/api/admin/site/media" tags:"后台官网" method:"post" summary:"保存官网素材"`
|
||||
Id int `json:"id" dc:"素材ID"`
|
||||
MediaType string `json:"media_type" dc:"素材类型"`
|
||||
GroupCode string `json:"group_code" dc:"素材分组"`
|
||||
Title string `json:"title" dc:"素材标题"`
|
||||
Url string `json:"url" dc:"素材URL"`
|
||||
Alt string `json:"alt" dc:"替代文本"`
|
||||
Status int `json:"status" dc:"状态"`
|
||||
Sort int `json:"sort" dc:"排序"`
|
||||
}
|
||||
|
||||
type SaveSiteMediaRes struct{}
|
||||
|
||||
// RecruitJobsReq 获取招聘职位列表。
|
||||
type RecruitJobsReq struct {
|
||||
g.Meta `path:"/api/admin/recruit/jobs" tags:"后台招聘" method:"get" summary:"获取招聘职位"`
|
||||
}
|
||||
|
||||
type RecruitJobsRes struct{}
|
||||
|
||||
// SaveRecruitJobReq 保存招聘职位。
|
||||
type SaveRecruitJobReq struct {
|
||||
g.Meta `path:"/api/admin/recruit/jobs" tags:"后台招聘" method:"post" summary:"保存招聘职位"`
|
||||
Id int `json:"id" dc:"职位ID"`
|
||||
Title string `json:"title" dc:"职位名称"`
|
||||
Department string `json:"department" dc:"部门"`
|
||||
JobType string `json:"job_type" dc:"职位类型"`
|
||||
City string `json:"city" dc:"城市"`
|
||||
Salary string `json:"salary" dc:"薪资"`
|
||||
Experience string `json:"experience" dc:"经验"`
|
||||
Description string `json:"description" dc:"职位描述"`
|
||||
Requirements []string `json:"requirements" dc:"岗位要求"`
|
||||
Manager string `json:"manager" dc:"负责人"`
|
||||
ManagerTitle string `json:"manager_title" dc:"负责人职位"`
|
||||
Email string `json:"email" dc:"邮箱"`
|
||||
Phone string `json:"phone" dc:"电话"`
|
||||
Featured bool `json:"featured" dc:"是否推荐"`
|
||||
Status int `json:"status" dc:"状态"`
|
||||
Sort int `json:"sort" dc:"排序"`
|
||||
}
|
||||
|
||||
type SaveRecruitJobRes struct{}
|
||||
|
||||
// SiteSettingsReq 获取站点全局配置。
|
||||
type SiteSettingsReq struct {
|
||||
g.Meta `path:"/api/admin/site/settings" tags:"后台官网" method:"get" summary:"获取站点配置"`
|
||||
}
|
||||
|
||||
type SiteSettingsRes struct{}
|
||||
|
||||
// SaveSiteSettingsReq 保存站点全局配置。
|
||||
type SaveSiteSettingsReq struct {
|
||||
g.Meta `path:"/api/admin/site/settings" tags:"后台官网" method:"post" summary:"保存站点配置"`
|
||||
SiteTitle string `json:"site_title" dc:"站点标题"`
|
||||
SiteLogo string `json:"site_logo" dc:"站点LOGO"`
|
||||
SiteLogoDark string `json:"site_logo_dark" dc:"暗色LOGO"`
|
||||
SiteFavicon string `json:"site_favicon" dc:"favicon"`
|
||||
IcpText string `json:"icp_text" dc:"备案信息"`
|
||||
Copyright string `json:"copyright" dc:"版权信息"`
|
||||
ContactPhone string `json:"contact_phone" dc:"联系电话"`
|
||||
ContactEmail string `json:"contact_email" dc:"联系邮箱"`
|
||||
ContactAddress string `json:"contact_address" dc:"联系地址"`
|
||||
DefaultSeo map[string]interface{} `json:"default_seo" dc:"默认SEO"`
|
||||
DefaultGso map[string]interface{} `json:"default_gso" dc:"默认GSO/GEO"`
|
||||
AmapKey string `json:"amap_key" dc:"高德Key"`
|
||||
AmapSecurityCode string `json:"amap_security_code" dc:"高德安全密钥"`
|
||||
}
|
||||
|
||||
type SaveSiteSettingsRes struct{}
|
||||
15
api/hello/hello.go
Normal file
15
api/hello/hello.go
Normal file
@@ -0,0 +1,15 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package hello
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"xk-of-api/api/hello/v1"
|
||||
)
|
||||
|
||||
type IHelloV1 interface {
|
||||
Hello(ctx context.Context, req *v1.HelloReq) (res *v1.HelloRes, err error)
|
||||
}
|
||||
12
api/hello/v1/hello.go
Normal file
12
api/hello/v1/hello.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
type HelloReq struct {
|
||||
g.Meta `path:"/hello" tags:"Hello" method:"get" summary:"You first hello api"`
|
||||
}
|
||||
type HelloRes struct {
|
||||
g.Meta `mime:"text/html" example:"string"`
|
||||
}
|
||||
24
api/lead/v1/lead.go
Normal file
24
api/lead/v1/lead.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package v1
|
||||
|
||||
import "github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
// CreateReq 是官网咨询线索创建请求。
|
||||
type CreateReq struct {
|
||||
g.Meta `path:"/api/leads" tags:"线索" method:"post" summary:"创建官网咨询线索"`
|
||||
Name string `json:"name" dc:"联系人姓名"`
|
||||
Phone string `json:"phone" dc:"联系电话"`
|
||||
ClinicName string `json:"clinic_name" dc:"诊所名称"`
|
||||
City string `json:"city" dc:"所在城市"`
|
||||
PlanCode string `json:"plan_code" dc:"意向套餐编码"`
|
||||
SourcePage string `json:"source_page" dc:"来源页面"`
|
||||
Remark string `json:"remark" dc:"备注"`
|
||||
}
|
||||
|
||||
type CreateRes struct{}
|
||||
|
||||
// AdminListReq 是后台线索列表请求。
|
||||
type AdminListReq struct {
|
||||
g.Meta `path:"/api/admin/leads" tags:"后台线索" method:"get" summary:"获取后台线索列表"`
|
||||
}
|
||||
|
||||
type AdminListRes struct{}
|
||||
30
api/order/v1/order.go
Normal file
30
api/order/v1/order.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package v1
|
||||
|
||||
import "github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
// CreateReq 是套餐订购订单创建请求。
|
||||
type CreateReq struct {
|
||||
g.Meta `path:"/api/orders" tags:"订单" method:"post" summary:"创建套餐订购订单"`
|
||||
TenantName string `json:"tenant_name" dc:"租户名称或诊所名称"`
|
||||
ContactName string `json:"contact_name" dc:"联系人姓名"`
|
||||
Phone string `json:"phone" dc:"联系电话"`
|
||||
PlanCode string `json:"plan_code" dc:"套餐编码"`
|
||||
BillingCycle string `json:"billing_cycle" dc:"订购周期 month月付 year年付"`
|
||||
}
|
||||
|
||||
type CreateRes struct{}
|
||||
|
||||
// DetailReq 是订单详情请求。
|
||||
type DetailReq struct {
|
||||
g.Meta `path:"/api/orders/{order_no}" tags:"订单" method:"get" summary:"获取订单详情"`
|
||||
OrderNo string `json:"order_no" in:"path" dc:"订单号"`
|
||||
}
|
||||
|
||||
type DetailRes struct{}
|
||||
|
||||
// AdminListReq 是后台订单列表请求。
|
||||
type AdminListReq struct {
|
||||
g.Meta `path:"/api/admin/orders" tags:"后台订单" method:"get" summary:"获取后台订单列表"`
|
||||
}
|
||||
|
||||
type AdminListRes struct{}
|
||||
11
api/payment/v1/payment.go
Normal file
11
api/payment/v1/payment.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package v1
|
||||
|
||||
import "github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
// NotifyReq 是支付渠道回调请求。
|
||||
type NotifyReq struct {
|
||||
g.Meta `path:"/api/payments/notify/{channel}" tags:"支付" method:"post" summary:"接收支付渠道回调"`
|
||||
Channel string `json:"channel" in:"path" dc:"支付渠道"`
|
||||
}
|
||||
|
||||
type NotifyRes struct{}
|
||||
17
api/pricing/v1/pricing.go
Normal file
17
api/pricing/v1/pricing.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package v1
|
||||
|
||||
import "github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
// PlansReq 是官网定价套餐请求。
|
||||
type PlansReq struct {
|
||||
g.Meta `path:"/api/pricing/plans" tags:"定价" method:"get" summary:"获取官网定价套餐"`
|
||||
}
|
||||
|
||||
type PlansRes struct{}
|
||||
|
||||
// AdminPlansReq 是后台套餐列表请求。
|
||||
type AdminPlansReq struct {
|
||||
g.Meta `path:"/api/admin/pricing/plans" tags:"后台定价" method:"get" summary:"获取后台套餐列表"`
|
||||
}
|
||||
|
||||
type AdminPlansRes struct{}
|
||||
24
api/site/v1/site.go
Normal file
24
api/site/v1/site.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package v1
|
||||
|
||||
import "github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
// HomeReq 是官网首页聚合内容请求。
|
||||
type HomeReq struct {
|
||||
g.Meta `path:"/api/site/home" tags:"官网" method:"get" summary:"获取官网首页内容"`
|
||||
}
|
||||
|
||||
type HomeRes struct{}
|
||||
|
||||
// SettingsReq 获取前台站点公开配置。
|
||||
type SettingsReq struct {
|
||||
g.Meta `path:"/api/site/settings" tags:"官网" method:"get" summary:"获取站点公开配置"`
|
||||
}
|
||||
|
||||
type SettingsRes struct{}
|
||||
|
||||
// RecruitJobsReq 获取前台招聘职位。
|
||||
type RecruitJobsReq struct {
|
||||
g.Meta `path:"/api/recruit/jobs" tags:"招聘" method:"get" summary:"获取招聘职位"`
|
||||
}
|
||||
|
||||
type RecruitJobsRes struct{}
|
||||
Reference in New Issue
Block a user