Documentation ¶
Index ¶
Constants ¶
View Source
const (
PasswordSalt = "20210407160200"
)
View Source
const (
TableNameCommunity = "community"
)
View Source
const (
TableNamePost = "post"
)
Variables ¶
This section is empty.
Functions ¶
func CheckUserExist ¶
CheckUserExist 根据用户名检查用户是否存在
Types ¶
type Community ¶
type Community struct { Id uint32 `json:"id" db:"id"` CommunityId uint32 `json:"community_id" db:"community_id"` CommunityName string `json:"community_name" db:"community_name"` Introduction string `json:"introduction" db:"introduction"` CreateTime string `json:"create_time" db:"create_time"` UpdateTime string `json:"update_time" db:"update_time"` }
func GetCommunityDetailById ¶
GetCommunityDetailById 根据社区id获取详情
type Post ¶
type Post struct { Id int64 `json:"id" db:"id"` PostId int64 `json:"post_id" db:"post_id"` AuthorId int64 `json:"author_id" db:"author_id"` CommunityId int64 `json:"community_id" db:"community_id"` Title string `json:"title" db:"title"` CreateTime string `json:"create_time" db:"create_time"` UpdateTime string `json:"update_time" db:"update_time"` Content string `json:"content" db:"content"` Status int `json:"status" db:"status"` }
func GetPostsByIds ¶
GetPostsByIds 根据文章ids获取文章列表
type User ¶
type User struct { Id uint64 `db:"id"` UserId int64 `db:"user_id"` Username string `db:"username"` Password string `db:"password"` Email string `db:"email"` CreateTime string `db:"create_time"` UpdateTime string `db:"update_time"` Gender int `db:"gender"` }
func GetUserByUserId ¶
GetUserByUserId 根据userId获取用户信息
func QueryUserByUsername ¶
Click to show internal directories.
Click to hide internal directories.