dcbot/internal/domain/group.go
Dawid Wysokiński d94b7bcbed
All checks were successful
continuous-integration/drone/push Build is passing
feat: add a new cmd - group add (#2)
Reviewed-on: #2
2022-10-03 05:19:33 +00:00

28 lines
453 B
Go

package domain
import "time"
type Group struct {
ID string
ServerID string
CreatedAt time.Time
}
type CreateGroupParams struct {
serverID string
}
func NewCreateGroupParams(serverID string) (CreateGroupParams, error) {
if serverID == "" {
return CreateGroupParams{}, RequiredError{
Field: "ServerID",
}
}
return CreateGroupParams{serverID: serverID}, nil
}
func (c CreateGroupParams) ServerID() string {
return c.serverID
}