model

package
v0.0.0-...-98b475a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Code

type Code struct {
	Id        string
	Email     string
	Code      string
	Type      string
	CreatedAt string
}

type CodeDTO

type CodeDTO struct {
	Email string `json:"email"`
	Code  string `json:"code"`
}

func (*CodeDTO) AddRegisterCode

func (c *CodeDTO) AddRegisterCode()

func (*CodeDTO) AddVerificationCode

func (c *CodeDTO) AddVerificationCode()

func (*CodeDTO) IsTooQuickRegister

func (c *CodeDTO) IsTooQuickRegister() bool

func (*CodeDTO) IsTooQuickVerification

func (c *CodeDTO) IsTooQuickVerification() bool

func (*CodeDTO) IsValidRegisterCode

func (c *CodeDTO) IsValidRegisterCode() bool

func (*CodeDTO) IsValidVerificationCode

func (c *CodeDTO) IsValidVerificationCode() bool

type Dau

type Dau struct {
	Id        string `json:"id"`
	UserId    string `json:"userId"`
	UserIp    string `json:"userIp"`
	CreatedAt string `json:"createdAt"`
}

func (*Dau) Add

func (d *Dau) Add()

func (*Dau) GetPastWeekData

func (d *Dau) GetPastWeekData(arr []string) []int

func (*Dau) GetTodayDauNum

func (d *Dau) GetTodayDauNum() int

func (*Dau) GetYesterdayDauNum

func (d *Dau) GetYesterdayDauNum() int

type Favorites

type Favorites struct {
	Id        string `json:"id"`
	UserId    string `json:"userId"`
	PostId    string `json:"postId"`
	CreatedAt string `json:"createdAt"`
}

func (*Favorites) Add

func (f *Favorites) Add()

func (*Favorites) Delete

func (f *Favorites) Delete()

func (*Favorites) GetPostCount

func (f *Favorites) GetPostCount() int

func (*Favorites) GetUserCount

func (f *Favorites) GetUserCount() int

func (*Favorites) IsFavorite

func (f *Favorites) IsFavorite() bool

func (*Favorites) List

func (f *Favorites) List(offset int) []string

type Friends

type Friends struct {
	Id        string `json:"id"`
	SelfId    string `json:"selfId"`
	FriendId  string `json:"friendId"`
	CreatedAt string `json:"createdAt"`
}

func (*Friends) Add

func (f *Friends) Add()

func (*Friends) DeleteFriend

func (f *Friends) DeleteFriend()

func (*Friends) FriendList

func (f *Friends) FriendList() []*Friends

func (*Friends) IsFriend

func (f *Friends) IsFriend() bool

type GroupMembers

type GroupMembers struct {
	Id      string `json:"id"`
	GroupId string `json:"groupId"`
	UserId  string `json:"userId"`
	Status  string `json:"status"`
}

func (*GroupMembers) Add

func (g *GroupMembers) Add()

func (*GroupMembers) BelongGroupList

func (g *GroupMembers) BelongGroupList() []*GroupMembers

func (*GroupMembers) BelongUserList

func (g *GroupMembers) BelongUserList() []*GroupMembers

func (*GroupMembers) DeleteGroupMember

func (g *GroupMembers) DeleteGroupMember()

func (*GroupMembers) DeleteGroupMembers

func (g *GroupMembers) DeleteGroupMembers()

func (*GroupMembers) IsInGroup

func (g *GroupMembers) IsInGroup() bool

type GroupMessages

type GroupMessages struct {
	Id        string `json:"id"`
	SenderId  string `json:"senderId"`
	GroupId   string `json:"groupId"`
	Message   string `json:"message"`
	CreatedAt string `json:"createdAt"`
}

func (*GroupMessages) Add

func (g *GroupMessages) Add() string

func (*GroupMessages) DeleteGroupMessages

func (g *GroupMessages) DeleteGroupMessages()

func (*GroupMessages) GetMessage

func (g *GroupMessages) GetMessage(time int) []*GroupMessages

func (*GroupMessages) GetPastWeekData

func (g *GroupMessages) GetPastWeekData(arr []string) []int

func (*GroupMessages) GetTodayGroupMessageNum

func (g *GroupMessages) GetTodayGroupMessageNum() int

func (*GroupMessages) GetYesterdayGroupMessageNum

func (g *GroupMessages) GetYesterdayGroupMessageNum() int

type Groups

type Groups struct {
	Id        string `json:"id"`
	Name      string `json:"name"`
	Avatar    string `json:"avatar"`
	CreatedAt string `json:"createdAt"`
	UpdatedAt string `json:"updatedAt"`
}

func (*Groups) Add

func (g *Groups) Add() string

func (*Groups) Delete

func (g *Groups) Delete()

func (*Groups) GetById

func (g *Groups) GetById() *Groups

func (*Groups) IsExist

func (g *Groups) IsExist() bool

func (*Groups) ModifyAvatar

func (g *Groups) ModifyAvatar()

func (*Groups) ModifyGroupName

func (g *Groups) ModifyGroupName()

type Likes

type Likes struct {
	Id        string `json:"id"`
	UserId    string `json:"userId"`
	PostId    string `json:"postId"`
	CreatedAt string `json:"createdAt"`
}

func (*Likes) Add

func (l *Likes) Add()

func (*Likes) Delete

func (l *Likes) Delete()

func (*Likes) GetCount

func (l *Likes) GetCount() int

func (*Likes) IsLike

func (l *Likes) IsLike() bool

type Messages

type Messages struct {
	Id         string `json:"id"`
	SenderId   string `json:"senderId"`
	ReceiverId string `json:"receiverId"`
	Message    string `json:"message"`
	CreatedAt  string `json:"createdAt"`
}

func (*Messages) Add

func (m *Messages) Add() string

func (*Messages) DeleteFriendMessage

func (m *Messages) DeleteFriendMessage()

func (*Messages) GetMessage

func (m *Messages) GetMessage(time int) []*Messages

func (*Messages) GetPastWeekData

func (m *Messages) GetPastWeekData(arr []string) []int

func (*Messages) GetTodayMessageNum

func (m *Messages) GetTodayMessageNum() int

func (*Messages) GetYesterdayMessageNum

func (m *Messages) GetYesterdayMessageNum() int

type Posts

type Posts struct {
	Id          string `json:"id"`
	UserId      string `json:"userId"`
	Title       string `json:"title"`
	Content     string `json:"content"`
	Category    string `json:"category"`
	ViewCount   string `json:"viewCount"`
	IsPublic    string `json:"isPublic"`
	PublishedAt string `json:"publishedAt"`
	CreatedAt   string `json:"createdAt"`
	UpdatedAt   string `json:"updatedAt"`
}

type PostsDTO

type PostsDTO struct {
	Id       string `json:"id"`
	UserId   string `json:"userId"`
	Title    string `json:"title"`
	Content  string `json:"content"`
	Category string `json:"category"`
}

func (*PostsDTO) Add

func (p *PostsDTO) Add()

func (*PostsDTO) AddView

func (p *PostsDTO) AddView()

func (*PostsDTO) Delete

func (p *PostsDTO) Delete()

func (*PostsDTO) GetById

func (p *PostsDTO) GetById() *Posts

func (*PostsDTO) GetFavoriteAndPublicIds

func (p *PostsDTO) GetFavoriteAndPublicIds(ids []string) []string

func (*PostsDTO) GetListTotalCount

func (p *PostsDTO) GetListTotalCount() int

func (*PostsDTO) GetMyListTotalCount

func (p *PostsDTO) GetMyListTotalCount() int

func (*PostsDTO) IsExistAndValid

func (p *PostsDTO) IsExistAndValid() bool

func (*PostsDTO) IsExistAndValid2

func (p *PostsDTO) IsExistAndValid2() bool

func (*PostsDTO) List

func (p *PostsDTO) List(offset int) []*Posts

func (*PostsDTO) ListByIds

func (p *PostsDTO) ListByIds(ids []string) []*Posts

func (*PostsDTO) MyList

func (p *PostsDTO) MyList(offset int) []*Posts

func (*PostsDTO) ToPrivate

func (p *PostsDTO) ToPrivate()

func (*PostsDTO) ToPublic

func (p *PostsDTO) ToPublic()

func (*PostsDTO) Update

func (p *PostsDTO) Update()

type Requests

type Requests struct {
	Id         string `json:"id"`
	UserId     string `json:"userId"`
	GroupId    string `json:"groupId"`
	ReceiverId string `json:"receiverId"`
	Remark     string `json:"remark"`
	Type       string `json:"type"`
	Finish     string `json:"finish"`
	Result     string `json:"result"`
	CreatedAt  string `json:"createdAt"`
}

func (*Requests) AddGroupRequest

func (r *Requests) AddGroupRequest()

func (*Requests) AddUserRequest

func (r *Requests) AddUserRequest()

func (*Requests) HandleRequest

func (r *Requests) HandleRequest()

func (*Requests) IsGroupRequestExist

func (r *Requests) IsGroupRequestExist() bool

func (*Requests) IsUserRequestExist

func (r *Requests) IsUserRequestExist() bool

func (*Requests) List

func (r *Requests) List() []*Requests

type SongFavorites

type SongFavorites struct {
	Id     string `json:"id"`
	UserId string `json:"user_id"`
	SongId string `json:"song_id"`
}

func (*SongFavorites) Add

func (sf *SongFavorites) Add()

func (*SongFavorites) Delete

func (sf *SongFavorites) Delete()

func (*SongFavorites) List

func (sf *SongFavorites) List() []string

type Songs

type Songs struct {
	Id     string `json:"id"`
	Title  string `json:"title"`
	Artist string `json:"artist"`
	Time   string `json:"time"`
}

func (*Songs) List

func (s *Songs) List() []*Songs

func (*Songs) ListByFavorite

func (s *Songs) ListByFavorite(ids []string) []*Songs

type TodoAddDTO

type TodoAddDTO struct {
	UserID      string `json:"userId"`
	Title       string `json:"title"`
	Description string `json:"description"`
	Priority    string `json:"priority"`
	Status      string `json:"status"`
	DueDate     string `json:"dueDate"`
}

func (*TodoAddDTO) Add

func (t *TodoAddDTO) Add()

type TodoEditDTO

type TodoEditDTO struct {
	Id          string `json:"id"`
	UserID      string `json:"userId"`
	Title       string `json:"title"`
	Description string `json:"description"`
	Priority    string `json:"priority"`
	Status      string `json:"status"`
	DueDate     string `json:"dueDate"`
}

func (*TodoEditDTO) Edit

func (t *TodoEditDTO) Edit()

func (*TodoEditDTO) IsExistAndValid

func (t *TodoEditDTO) IsExistAndValid() bool

type TodoIdDTO

type TodoIdDTO struct {
	Id string `json:"id"`
}

func (*TodoIdDTO) Delete

func (t *TodoIdDTO) Delete()

func (*TodoIdDTO) GetById

func (t *TodoIdDTO) GetById() *TodoList

type TodoList

type TodoList struct {
	Id          string `json:"id"`
	UserId      string `json:"userId"`
	Title       string `json:"title"`
	Description string `json:"description"`
	Priority    string `json:"priority"`
	Status      string `json:"status"`
	DueDate     string `json:"dueDate"`
	CreatedAt   string `json:"createdAt"`
	UpdatedAt   string `json:"updatedAt"`
}

func (*TodoList) GetPastWeekData

func (t *TodoList) GetPastWeekData(arr []string) []int

func (*TodoList) GetTodayTodolistNum

func (t *TodoList) GetTodayTodolistNum() int

func (*TodoList) GetYesterdayTodolistNum

func (t *TodoList) GetYesterdayTodolistNum() int

type TodoListDTO

type TodoListDTO struct {
	UserID    string `json:"userId"`
	CreatedAt string `json:"createdAt"`
}

func (*TodoListDTO) List

func (t *TodoListDTO) List() []*TodoList

type User

type User struct {
	Id            string `json:"id"`
	Username      string `json:"username"`
	Password      string `json:"password"`
	Email         string `json:"email"`
	Avatar        string `json:"avatar"`
	Path          string `json:"path"`
	EmailUpdateAt string `json:"emailUpdateAt"`
	CreatedAt     string `json:"createdAt"`
	UpdatedAt     string `json:"updatedAt"`
}

type UserAvatarDTO

type UserAvatarDTO struct {
	Id     string `json:"id"`
	Avatar string `json:"avatar"`
}

func (*UserAvatarDTO) GetUser

func (u *UserAvatarDTO) GetUser() *User

type UserIdDTO

type UserIdDTO struct {
	Id string `json:"id"`
}

func (*UserIdDTO) GetById

func (u *UserIdDTO) GetById() *User

func (*UserIdDTO) IsIdExist

func (u *UserIdDTO) IsIdExist() bool

type UserLoginByCodeDTO

type UserLoginByCodeDTO struct {
	Email string `json:"email"`
	Code  string `json:"code"`
}

func (*UserLoginByCodeDTO) GetUser

func (u *UserLoginByCodeDTO) GetUser() *User

func (*UserLoginByCodeDTO) IsEmailExist

func (u *UserLoginByCodeDTO) IsEmailExist() bool

type UserLoginByPasswordDTO

type UserLoginByPasswordDTO struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

func (*UserLoginByPasswordDTO) GetUser

func (u *UserLoginByPasswordDTO) GetUser() *User

func (*UserLoginByPasswordDTO) IsCorrectPassword

func (u *UserLoginByPasswordDTO) IsCorrectPassword() bool

func (*UserLoginByPasswordDTO) IsEmailExist

func (u *UserLoginByPasswordDTO) IsEmailExist() bool

type UserModifyDTO

type UserModifyDTO struct {
	Id            string `json:"id"`
	Email         string `json:"email"`
	EmailUpdateAt string `json:"emailUpdateAt"`
	Username      string `json:"username"`
	Password      string `json:"password"`
	Avatar        string `json:"avatar"`
	Path          string `json:"path"`
}

func (*UserModifyDTO) IsEmailExist

func (u *UserModifyDTO) IsEmailExist() bool

func (*UserModifyDTO) IsPathExist

func (u *UserModifyDTO) IsPathExist() bool

func (*UserModifyDTO) ModifyAvatar

func (u *UserModifyDTO) ModifyAvatar()

func (*UserModifyDTO) ModifyEmail

func (u *UserModifyDTO) ModifyEmail()

func (*UserModifyDTO) ModifyPassword

func (u *UserModifyDTO) ModifyPassword()

func (*UserModifyDTO) ModifyPath

func (u *UserModifyDTO) ModifyPath()

func (*UserModifyDTO) ModifyUsername

func (u *UserModifyDTO) ModifyUsername()

type UserRegisterDTO

type UserRegisterDTO struct {
	Username string `json:"username"`
	Email    string `json:"email"`
	Password string `json:"password"`
	Code     string `json:"code"`
	Path     string `json:"path"`
}

func (*UserRegisterDTO) Add

func (u *UserRegisterDTO) Add() string

func (*UserRegisterDTO) GetUser

func (u *UserRegisterDTO) GetUser() *User

func (*UserRegisterDTO) IsEmailExist

func (u *UserRegisterDTO) IsEmailExist() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL