add activities.
This commit is contained in:
+13
-6
@@ -3,10 +3,17 @@ package models
|
||||
// Activity is an activity within a project that can be measured and estimated, for example "writing" or "developing".
|
||||
// The points are for the "gamified" aspect of this.
|
||||
type Activity struct {
|
||||
ID string `db:"activity_id"`
|
||||
ProjectID string `db:"project_id"`
|
||||
Countable bool `db:"countable"`
|
||||
UnitName string `db:"unit_name"`
|
||||
UnitValue float64 `db:"unit_value"`
|
||||
BaseValue float64 `db:"base_value"`
|
||||
ID string `db:"activity_id"`
|
||||
ProjectID string `db:"project_id"`
|
||||
Name string `db:"name"`
|
||||
Countable bool `db:"countable"`
|
||||
UnitIsTimeSpent bool `db:"unit_is_time"`
|
||||
UnitName string `db:"unit_name"`
|
||||
UnitValue float64 `db:"unit_value"`
|
||||
BaseValue float64 `db:"base_value"`
|
||||
}
|
||||
|
||||
type ActivityFilter struct {
|
||||
ActivityIDs []string
|
||||
ProjectIDs []string
|
||||
}
|
||||
|
||||
@@ -34,3 +34,7 @@ func (permission *ProjectPermission) CanManageAnyIssue() bool {
|
||||
func (permission *ProjectPermission) CanManagePermissions() bool {
|
||||
return permission.Level >= ProjectPermissionLevelOwner
|
||||
}
|
||||
|
||||
func (permission *ProjectPermission) CanManageActivities() bool {
|
||||
return permission.Level >= ProjectPermissionLevelAdmin
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user