28 lines
453 B
Go
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
|
||
|
}
|