dcbot/internal/domain/group.go

28 lines
453 B
Go
Raw Normal View History

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
}