| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- syntax = "v1"
- info(
- title: // TODO: add title
- desc: // TODO: add description
- author: "double.huang"
- email: "2637309949@qq.com"
- )
- type WXLoginResponse {
- OpenID string `json:"openid"`
- SessionKey string `json:"session_key"`
- UnionID string `json:"unionid"`
- ErrCode int `json:"errcode"`
- ErrMsg string `json:"errmsg"`
- }
- type Watermark {
- AppID string `json:"appid"`
- TimeStamp int64 `json:"timestamp"`
- }
- type WXUserInfo {
- OpenID string `json:"openId,omitempty"`
- SessionKey string `json:"SessionKey"`
- NickName string `json:"nickName"`
- AvatarUrl string `json:"avatarUrl"`
- Gender int64 `json:"gender"`
- Country string `json:"country"`
- Province string `json:"province"`
- City string `json:"city"`
- UnionID string `json:"unionId,omitempty"`
- Language string `json:"language"`
- Watermark Watermark `json:"watermark,omitempty"`
- }
- type ResUserInfo {
- UserInfo WXUserInfo `json:"userInfo"`
- RawData string `json:"rawData"`
- Signature string `json:"signature"`
- EncryptedData string `json:"encryptedData"`
- IV string `json:"iv"`
- }
- type loginByWeixinRequest {
- Code string `json:"code"`
- // UserInfo ResUserInfo `json:"userInfo"`
- }
- type AuthUserInfo {
- ID int64 `json:"id"`
- Mobile string `json:"mobile"`
- UserName string `json:"username"`
- NickName string `json:"nickname"`
- Gender int64 `json:"gender"`
- Avatar string `json:"avatar"`
- Birthday int64 `json:"birthday"`
- }
- type loginByWeixinResponse {
- Token string `json:"token"`
- UserInfo AuthUserInfo `json:"userInfo"`
- }
- type jzQrcodeResponse {
- Id int64 `json:"id"`
- FileId string `json:"fileId"`
- }
- type bindMobileRequest {
- Iv string `json:"iv"`
- EncryptedData string `json:"encryptedData"`
- }
- type bindMobileResponse {
- Id int64 `json:"id"`
- }
- type partTimeUserAddRequest {
- Name string `json:"name"`
- IponeNumber string `json:"ipone_number"`
- Sex int64 `json:"sex"`
- MkId string `json:"mk_id"`
- CityId int64 `json:"city_id"` // 城市
- }
- type infoResponse {
- ID int64 `json:"id"`
- Mobile string `json:"mobile"`
- UserName string `json:"username"`
- NickName string `json:"nickname"`
- Gender int64 `json:"gender"`
- Avatar string `json:"avatar"`
- Birthday int64 `json:"birthday"`
- ErpRoleType int64 `json:"erpRoleType"`
- }
- type Response {
- Code int `json:"code"`
- Msg string `json:"msg"`
- Data interface{} `json:"data"`
- }
- service i2bill-api {
- @handler Hello
- get /api/hello
- @handler LoginByWeixin
- post /api/auth/loginByWeixin(loginByWeixinRequest) returns(loginByWeixinResponse)
- }
- @server(
- jwt: JwtAuth
- )
- service i2bill-api {
- @handler JzQrCode
- get /api/user/share/jzQrcode returns(jzQrcodeResponse)
-
- @handler BindMobile
- post /api/user/bindMobile(bindMobileRequest) returns(bindMobileResponse)
-
- @handler GetUser
- get /api/user/info returns(infoResponse)
-
- @handler PartTimeUserAdd
- post /api/v1/part_time_user/add (partTimeUserAddRequest) returns(Response)
-
- @handler PartTimeUserUpdate
- post /api/v1/part_time_user/update (partTimeUserAddRequest) returns(Response)
- }
|