-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.go
More file actions
31 lines (25 loc) · 941 Bytes
/
models.go
File metadata and controls
31 lines (25 loc) · 941 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package main
import "SuperChat/internal/model"
type User = model.User
type Team = model.Team
type TeamMember = model.TeamMember
type Message = model.Message
type LoginRequest = model.LoginRequest
type RegisterRequest = model.RegisterRequest
type CreateTeamRequest = model.CreateTeamRequest
type SendMessageRequest = model.SendMessageRequest
type APIResponse = model.APIResponse
type WebSocketMessage = model.WebSocketMessage
type UploadMeta = model.UploadMeta
func NewUser(username, name, password string) *User {
return model.NewUser(username, name, password)
}
func NewTeam(name, description, ownerID string) *Team {
return model.NewTeam(name, description, ownerID)
}
func NewMessage(teamID, userID, username, content, msgType string) *Message {
return model.NewMessage(teamID, userID, username, content, msgType)
}
func NewTeamMember(teamID, userID, role string) *TeamMember {
return model.NewTeamMember(teamID, userID, role)
}