Implement greet inbox and outbox
- Add user_greet model and startup table sync - Implement /greet/user and /greet/delete handlers - Implement noticeFriendGreeting inbox and noticeUserGreetingHistory outbox - Return peer profile and center unit info for greeting notices - Update login topInfo friend greet counters from unread inbox messages Signed-off-by: Sean Du <do4suki@gmail.com>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
package greetschema
|
||||
|
||||
type EmptyResp struct {
|
||||
ResponseData []any `json:"response_data"`
|
||||
ReleaseInfo []any `json:"release_info"`
|
||||
StatusCode int `json:"status_code"`
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package greetschema
|
||||
|
||||
type DeleteReq struct {
|
||||
Module string `json:"module"`
|
||||
Action string `json:"action"`
|
||||
TimeStamp int64 `json:"timeStamp"`
|
||||
Mgd int `json:"mgd"`
|
||||
IsSendMail bool `json:"is_send_mail"`
|
||||
MailNoticeID int `json:"mail_notice_id"`
|
||||
CommandNum string `json:"commandNum"`
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package greetschema
|
||||
|
||||
type UserReq struct {
|
||||
Module string `json:"module"`
|
||||
Mgd int `json:"mgd"`
|
||||
Action string `json:"action"`
|
||||
TimeStamp int64 `json:"timeStamp"`
|
||||
ToUserID int `json:"to_user_id"`
|
||||
Message string `json:"message"`
|
||||
RepliedNoticeID int `json:"replied_notice_id"`
|
||||
CommandNum string `json:"commandNum"`
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package noticeschema
|
||||
|
||||
type GreetingNoticeReq struct {
|
||||
Module string `json:"module"`
|
||||
Action string `json:"action"`
|
||||
TimeStamp int64 `json:"timeStamp"`
|
||||
Mgd int `json:"mgd"`
|
||||
NextID int `json:"next_id"`
|
||||
IsPrevious bool `json:"is_previous"`
|
||||
CommandNum string `json:"commandNum"`
|
||||
}
|
||||
|
||||
type GreetingUserData struct {
|
||||
UserID int `json:"user_id"`
|
||||
Name string `json:"name"`
|
||||
Level int `json:"level"`
|
||||
}
|
||||
|
||||
type GreetingAccessoryInfo struct {
|
||||
AccessoryOwningUserID int `json:"accessory_owning_user_id"`
|
||||
AccessoryID int `json:"accessory_id"`
|
||||
Exp int `json:"exp"`
|
||||
NextExp int `json:"next_exp"`
|
||||
Level int `json:"level"`
|
||||
MaxLevel int `json:"max_level"`
|
||||
RankUpCount int `json:"rank_up_count"`
|
||||
FavoriteFlag bool `json:"favorite_flag"`
|
||||
}
|
||||
|
||||
type GreetingCenterUnitInfo struct {
|
||||
UnitOwningUserID int64 `json:"unit_owning_user_id"`
|
||||
UnitID int `json:"unit_id"`
|
||||
Exp int `json:"exp"`
|
||||
NextExp int `json:"next_exp"`
|
||||
Level int `json:"level"`
|
||||
LevelLimitID int `json:"level_limit_id"`
|
||||
MaxLevel int `json:"max_level"`
|
||||
Rank int `json:"rank"`
|
||||
MaxRank int `json:"max_rank"`
|
||||
Love int `json:"love"`
|
||||
MaxLove int `json:"max_love"`
|
||||
UnitSkillLevel int `json:"unit_skill_level"`
|
||||
MaxHp int `json:"max_hp"`
|
||||
FavoriteFlag bool `json:"favorite_flag"`
|
||||
DisplayRank int `json:"display_rank"`
|
||||
UnitSkillExp int `json:"unit_skill_exp"`
|
||||
UnitRemovableSkillCapacity int `json:"unit_removable_skill_capacity"`
|
||||
Attribute int `json:"attribute"`
|
||||
Smile int `json:"smile"`
|
||||
Cute int `json:"cute"`
|
||||
Cool int `json:"cool"`
|
||||
IsLoveMax bool `json:"is_love_max"`
|
||||
IsLevelMax bool `json:"is_level_max"`
|
||||
IsRankMax bool `json:"is_rank_max"`
|
||||
IsSigned bool `json:"is_signed"`
|
||||
IsSkillLevelMax bool `json:"is_skill_level_max"`
|
||||
SettingAwardID int `json:"setting_award_id"`
|
||||
RemovableSkillIds []int `json:"removable_skill_ids"`
|
||||
AccessoryInfo *GreetingAccessoryInfo `json:"accessory_info,omitempty"`
|
||||
}
|
||||
|
||||
type GreetingPeer struct {
|
||||
UserData GreetingUserData `json:"user_data"`
|
||||
CenterUnitInfo GreetingCenterUnitInfo `json:"center_unit_info"`
|
||||
SettingAwardID int `json:"setting_award_id"`
|
||||
}
|
||||
@@ -1,9 +1,21 @@
|
||||
package noticeschema
|
||||
|
||||
type FriendGreetingData struct {
|
||||
NextId int `json:"next_id"`
|
||||
NoticeList []any `json:"notice_list"`
|
||||
ServerTimestamp int64 `json:"server_timestamp"`
|
||||
NextId int `json:"next_id"`
|
||||
NoticeList []FriendGreetingNotice `json:"notice_list"`
|
||||
ServerTimestamp int64 `json:"server_timestamp"`
|
||||
}
|
||||
|
||||
type FriendGreetingNotice struct {
|
||||
NoticeID int `json:"notice_id"`
|
||||
NewFlag bool `json:"new_flag"`
|
||||
ReferenceTable int `json:"reference_table"`
|
||||
Message string `json:"message"`
|
||||
ListMessage string `json:"list_message"`
|
||||
Readed bool `json:"readed"`
|
||||
InsertDate string `json:"insert_date"`
|
||||
Affector GreetingPeer `json:"affector"`
|
||||
ReplyFlag bool `json:"reply_flag"`
|
||||
}
|
||||
|
||||
type FriendGreetingResp struct {
|
||||
|
||||
@@ -1,10 +1,21 @@
|
||||
package noticeschema
|
||||
|
||||
type UserGreetingData struct {
|
||||
ItemCount int `json:"item_count"`
|
||||
HasNext bool `json:"has_next"`
|
||||
NoticeList []any `json:"notice_list"`
|
||||
ServerTimestamp int64 `json:"server_timestamp"`
|
||||
ItemCount int `json:"item_count"`
|
||||
HasNext bool `json:"has_next"`
|
||||
NoticeList []UserGreetingNotice `json:"notice_list"`
|
||||
ServerTimestamp int64 `json:"server_timestamp"`
|
||||
}
|
||||
|
||||
type UserGreetingNotice struct {
|
||||
NoticeID int `json:"notice_id"`
|
||||
ReferenceTable int `json:"reference_table"`
|
||||
Message string `json:"message"`
|
||||
ListMessage string `json:"list_message"`
|
||||
InsertDate string `json:"insert_date"`
|
||||
Receiver GreetingPeer `json:"receiver"`
|
||||
ReplyFlag bool `json:"reply_flag"`
|
||||
Readed bool `json:"readed"`
|
||||
}
|
||||
|
||||
type UserGreetingResp struct {
|
||||
|
||||
Reference in New Issue
Block a user