2024-11-03 15:28:10 +08:00
|
|
|
syntax = "v1"
|
|
|
|
|
|
|
|
info (
|
|
|
|
title: "用户实例"
|
|
|
|
desc: "用户实例"
|
|
|
|
author: "Liangzai"
|
|
|
|
email: "2440983361@qq.com"
|
|
|
|
)
|
|
|
|
|
|
|
|
type User {
|
2024-11-03 19:06:09 +08:00
|
|
|
Id int64 `json:"id"`
|
|
|
|
Mobile string `json:"mobile"`
|
|
|
|
NickName string `json:"nickName"`
|
2024-11-03 15:28:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type (
|
|
|
|
RegisterReq {
|
|
|
|
Mobile string `json:"mobile" validate:"required,mobile"`
|
2024-11-03 19:06:09 +08:00
|
|
|
Password string `json:"password" validate:"required,min=11,max=11,password"`
|
|
|
|
Code string `json:"code" validate:"required"`
|
2024-11-03 15:28:10 +08:00
|
|
|
}
|
|
|
|
RegisterResp {
|
|
|
|
AccessToken string `json:"accessToken"`
|
|
|
|
AccessExpire int64 `json:"accessExpire"`
|
|
|
|
RefreshAfter int64 `json:"refreshAfter"`
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
type (
|
2024-11-03 19:06:09 +08:00
|
|
|
MobileLoginReq {
|
|
|
|
Mobile string `json:"mobile" validate:"required,mobile"`
|
|
|
|
Password string `json:"password" validate:"required"`
|
|
|
|
}
|
|
|
|
MobileLoginResp {
|
|
|
|
AccessToken string `json:"accessToken"`
|
|
|
|
AccessExpire int64 `json:"accessExpire"`
|
|
|
|
RefreshAfter int64 `json:"refreshAfter"`
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
type (
|
|
|
|
MobileCodeLoginReq {
|
|
|
|
Mobile string `json:"mobile"`
|
|
|
|
Code string `json:"code" validate:"required"`
|
2024-11-03 15:28:10 +08:00
|
|
|
}
|
2024-11-03 19:06:09 +08:00
|
|
|
MobileCodeLoginResp {
|
2024-11-03 15:28:10 +08:00
|
|
|
AccessToken string `json:"accessToken"`
|
|
|
|
AccessExpire int64 `json:"accessExpire"`
|
|
|
|
RefreshAfter int64 `json:"refreshAfter"`
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
type (
|
|
|
|
WXMiniAuthReq {
|
|
|
|
Code string `json:"code"`
|
|
|
|
}
|
|
|
|
WXMiniAuthResp {
|
|
|
|
AccessToken string `json:"accessToken"`
|
|
|
|
AccessExpire int64 `json:"accessExpire"`
|
|
|
|
RefreshAfter int64 `json:"refreshAfter"`
|
|
|
|
}
|
|
|
|
)
|
2024-12-24 11:37:25 +08:00
|
|
|
type (
|
|
|
|
WXH5AuthReq {
|
|
|
|
Code string `json:"code"`
|
|
|
|
}
|
|
|
|
WXH5AuthResp {
|
|
|
|
AccessToken string `json:"accessToken"`
|
|
|
|
AccessExpire int64 `json:"accessExpire"`
|
|
|
|
RefreshAfter int64 `json:"refreshAfter"`
|
|
|
|
}
|
|
|
|
)
|
2024-11-03 15:28:10 +08:00
|
|
|
type (
|
|
|
|
UserInfoResp {
|
|
|
|
UserInfo User `json:"userInfo"`
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
2025-01-01 02:00:06 +08:00
|
|
|
//============================> notification v1 <============================
|
|
|
|
type Notification {
|
|
|
|
Title string `json:"title"` // 通知标题
|
|
|
|
Content string `json:"content"` // 通知内容 (富文本)
|
|
|
|
NotificationPage string `json:"notificationPage"` // 通知页面
|
|
|
|
StartDate string `json:"startDate"` // 通知开始日期,格式 "YYYY-MM-DD"
|
|
|
|
EndDate string `json:"endDate"` // 通知结束日期,格式 "YYYY-MM-DD"
|
|
|
|
StartTime string `json:"startTime"` // 每天通知开始时间,格式 "HH:MM:SS"
|
|
|
|
EndTime string `json:"endTime"` // 每天通知结束时间,格式 "HH:MM:SS"
|
|
|
|
}
|
|
|
|
type (
|
|
|
|
// 获取通知响应体(分页)
|
|
|
|
GetNotificationsResp {
|
|
|
|
Notifications []Notification `json:"notifications"` // 通知列表
|
|
|
|
Total int64 `json:"total"` // 总记录数
|
|
|
|
}
|
|
|
|
)
|