32 lines
549 B
Go
32 lines
549 B
Go
|
package projects
|
||
|
|
||
|
type Project struct {
|
||
|
Id int
|
||
|
Name string
|
||
|
MemberIds []int
|
||
|
AdminIds []int
|
||
|
}
|
||
|
|
||
|
func NewProject(id int, name string, memberIds []int, adminIds []int) *Project {
|
||
|
return &Project{
|
||
|
Id: id,
|
||
|
Name: name,
|
||
|
MemberIds: memberIds,
|
||
|
AdminIds: adminIds,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
type CreateProject struct {
|
||
|
Name string
|
||
|
MemberIds []int
|
||
|
AdminIds []int
|
||
|
}
|
||
|
|
||
|
func NewCreateProject(name string, userId int) *CreateProject {
|
||
|
return &CreateProject{
|
||
|
Name: name,
|
||
|
MemberIds: []int{userId},
|
||
|
AdminIds: []int{userId},
|
||
|
}
|
||
|
}
|