feat: add file move and trash retention
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
import (
|
||||
"errors"
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
NodeTypeFolder = "folder"
|
||||
@@ -12,6 +15,8 @@ const (
|
||||
AccessEdit = "edit"
|
||||
)
|
||||
|
||||
var ErrInvalidMove = errors.New("invalid move")
|
||||
|
||||
type Node struct {
|
||||
ID string `json:"id"`
|
||||
ParentID *string `json:"parent_id,omitempty"`
|
||||
@@ -32,6 +37,8 @@ type Node struct {
|
||||
EffectiveAccess string `json:"effective_access"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
TrashedAt *time.Time `json:"trashed_at,omitempty"`
|
||||
PurgeAfter *time.Time `json:"purge_after,omitempty"`
|
||||
DeletedAt *time.Time `json:"deleted_at,omitempty"`
|
||||
}
|
||||
|
||||
@@ -52,6 +59,10 @@ type UpdateNodeRequest struct {
|
||||
Title *string `json:"title"`
|
||||
}
|
||||
|
||||
type MoveNodeRequest struct {
|
||||
ParentID *string `json:"parent_id"`
|
||||
}
|
||||
|
||||
type ReplaceAccessRequest struct {
|
||||
Access []Access `json:"access"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user