Skip to content

Commit

Permalink
add additional files for dashboard types
Browse files Browse the repository at this point in the history
  • Loading branch information
PaluMacil committed Apr 30, 2019
1 parent 109c1f1 commit 220ee65
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
9 changes: 9 additions & 0 deletions module/dashboard/favorite.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package dashboard

import (
"github.com/PaluMacil/dwn/database/store"
)

type Favorite struct {
ProjectID store.Identity `json:"project_id"`
}
5 changes: 5 additions & 0 deletions module/dashboard/owner.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package dashboard

type Owner struct {

}
5 changes: 5 additions & 0 deletions module/dashboard/participant.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package dashboard

type Participant struct {

}
17 changes: 17 additions & 0 deletions module/dashboard/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,25 @@ type Project struct {
ID store.Identity `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Links []Link `json:"links"`
// Owners, Participants, both as slices of user id (email?)
}

type Link struct {
Text string `json:"name"`
Order int `json:"order"`
Audience UserType `json:"audience"`
External bool `json:"external"`
Ref string `json:"ref"`
}

type UserType string
const (
UserTypeOwner UserType = "OWNER"
UserTypeParticipant UserType = "USER"
UserTypePublic UserType = "PUBLIC"
)

func (p Project) Key() []byte {
return append(p.Prefix(), p.ID.Bytes()...)
}
Expand Down

0 comments on commit 220ee65

Please sign in to comment.