From 627cd0a6f4fa1025e47662d7291e83aa67a8dcfc Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 7 Jun 2026 12:19:14 +0200 Subject: [PATCH] docs(api/v2): tag project team share fields for the v2 schema --- pkg/models/project_team.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/models/project_team.go b/pkg/models/project_team.go index f67a1fb26..0c9fb6908 100644 --- a/pkg/models/project_team.go +++ b/pkg/models/project_team.go @@ -29,18 +29,18 @@ import ( // TeamProject defines the relation between a team and a project type TeamProject struct { // The unique, numeric id of this project <-> team relation. - ID int64 `xorm:"bigint autoincr not null unique pk" json:"id"` + ID int64 `xorm:"bigint autoincr not null unique pk" json:"id" readOnly:"true" doc:"The unique, numeric id of this project <-> team relation."` // The team id. - TeamID int64 `xorm:"bigint not null INDEX" json:"team_id" param:"team"` + TeamID int64 `xorm:"bigint not null INDEX" json:"team_id" param:"team" doc:"The id of the team that gets access to the project."` // The project id. ProjectID int64 `xorm:"bigint not null INDEX" json:"-" param:"project"` // The permission this team has. 0 = Read only, 1 = Read & Write, 2 = Admin. See the docs for more details. - Permission Permission `xorm:"bigint INDEX not null default 0" json:"permission" valid:"length(0|2)" maximum:"2" default:"0"` + Permission Permission `xorm:"bigint INDEX not null default 0" json:"permission" valid:"length(0|2)" maximum:"2" default:"0" doc:"The permission this team has on the project: 0 = Read only, 1 = Read & Write, 2 = Admin."` // A timestamp when this relation was created. You cannot change this value. - Created time.Time `xorm:"created not null" json:"created"` + Created time.Time `xorm:"created not null" json:"created" readOnly:"true" doc:"A timestamp when this relation was created. You cannot change this value."` // A timestamp when this relation was last updated. You cannot change this value. - Updated time.Time `xorm:"updated not null" json:"updated"` + Updated time.Time `xorm:"updated not null" json:"updated" readOnly:"true" doc:"A timestamp when this relation was last updated. You cannot change this value."` web.CRUDable `xorm:"-" json:"-"` web.Permissions `xorm:"-" json:"-"` @@ -54,7 +54,7 @@ func (*TeamProject) TableName() string { // TeamWithPermission represents a team, combined with permissions. type TeamWithPermission struct { Team `xorm:"extends"` - Permission Permission `json:"permission"` + Permission Permission `json:"permission" readOnly:"true" doc:"The permission this team has on the project: 0 = Read only, 1 = Read & Write, 2 = Admin."` } // Create creates a new team <-> project relation