Initial commit

This commit is contained in:
Donny
2019-04-22 20:46:32 +08:00
commit 49ab8aadd1
25441 changed files with 4055000 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
package model
// All const variable used in thumbup
const (
ThumbupLike int8 = 1 // 点赞
ThumbupLikeCancel int8 = 2 // 取消赞
ThumbupHate int8 = 3 // 点踩
ThumbupHateCancel int8 = 4 // 取消踩
)
// ThumbupStat thumbup state
type ThumbupStat struct {
Likes int64 `json:"likes"`
UserLike int8 `json:"user_like"`
}
// CheckThumbup check thumbup.
func CheckThumbup(Thumbup int8) bool {
if Thumbup == ThumbupLikeCancel || Thumbup == ThumbupLike || Thumbup == ThumbupHateCancel || Thumbup == ThumbupHate {
return true
}
return false
}