docs(api/v2): tag task attachment fields for the v2 schema
This commit is contained in:
parent
cec74717fc
commit
dc935f263c
|
|
@ -37,12 +37,12 @@ import (
|
|||
|
||||
// File holds all information about a file
|
||||
type File struct {
|
||||
ID int64 `xorm:"bigint autoincr not null unique pk" json:"id"`
|
||||
Name string `xorm:"text not null" json:"name"`
|
||||
Mime string `xorm:"text null" json:"mime"`
|
||||
Size uint64 `xorm:"bigint not null" json:"size"`
|
||||
ID int64 `xorm:"bigint autoincr not null unique pk" json:"id" readOnly:"true" doc:"The unique, numeric id of this file."`
|
||||
Name string `xorm:"text not null" json:"name" readOnly:"true" doc:"The original name of the uploaded file."`
|
||||
Mime string `xorm:"text null" json:"mime" readOnly:"true" doc:"The detected mime type of the file."`
|
||||
Size uint64 `xorm:"bigint not null" json:"size" readOnly:"true" doc:"The size of the file in bytes."`
|
||||
|
||||
Created time.Time `xorm:"created" json:"created"`
|
||||
Created time.Time `xorm:"created" json:"created" readOnly:"true" doc:"A timestamp when this file was uploaded."`
|
||||
CreatedByID int64 `xorm:"bigint not null" json:"-"`
|
||||
|
||||
File io.ReadCloser `xorm:"-" json:"-"`
|
||||
|
|
|
|||
|
|
@ -39,16 +39,16 @@ import (
|
|||
|
||||
// TaskAttachment is the definition of a task attachment
|
||||
type TaskAttachment struct {
|
||||
ID int64 `xorm:"bigint autoincr not null unique pk" json:"id" param:"attachment"`
|
||||
TaskID int64 `xorm:"bigint not null" json:"task_id" param:"task"`
|
||||
ID int64 `xorm:"bigint autoincr not null unique pk" json:"id" param:"attachment" readOnly:"true" doc:"The unique, numeric id of this attachment."`
|
||||
TaskID int64 `xorm:"bigint not null" json:"task_id" param:"task" readOnly:"true" doc:"The id of the task this attachment belongs to. Taken from the URL, not the body."`
|
||||
FileID int64 `xorm:"bigint not null" json:"-"`
|
||||
|
||||
CreatedByID int64 `xorm:"bigint not null" json:"-"`
|
||||
CreatedBy *user.User `xorm:"-" json:"created_by"`
|
||||
CreatedBy *user.User `xorm:"-" json:"created_by" readOnly:"true" doc:"The user who uploaded this attachment."`
|
||||
|
||||
File *files.File `xorm:"-" json:"file"`
|
||||
File *files.File `xorm:"-" json:"file" readOnly:"true" doc:"Metadata of the uploaded file (name, mime type, size). The bytes are fetched from the download endpoint, not this field."`
|
||||
|
||||
Created time.Time `xorm:"created" json:"created"`
|
||||
Created time.Time `xorm:"created" json:"created" readOnly:"true" doc:"A timestamp when this attachment was uploaded. You cannot change this value."`
|
||||
|
||||
web.CRUDable `xorm:"-" json:"-"`
|
||||
web.Permissions `xorm:"-" json:"-"`
|
||||
|
|
|
|||
Loading…
Reference in New Issue