Update usage grpc call

This commit is contained in:
2025-03-10 22:15:59 +08:00
parent 69be460e13
commit e3ca50c4ae
6 changed files with 248 additions and 60 deletions

View File

@ -3,10 +3,11 @@ package models
import (
"context"
"fmt"
"git.solsynth.dev/hypernet/paperclip/pkg/proto"
"strconv"
"time"
"git.solsynth.dev/hypernet/paperclip/pkg/proto"
"git.solsynth.dev/hypernet/nexus/pkg/nex/cruda"
"github.com/eko/gocache/lib/v4/cache"
"github.com/eko/gocache/lib/v4/marshaler"
@ -56,6 +57,8 @@ type Attachment struct {
IsSelfRef bool `json:"is_self_ref"`
IsIndexable bool `json:"is_indexable"` // Show this attachment in the public directory api or not
// Count the usage of this attachment across all services
// If this number remain 0, it will be deleted during the maintenance
UsedCount int `json:"used_count"`
Thumbnail *Attachment `json:"thumbnail"`