Defines GORM models and request structs for user file/directory resources in a backend service.
// Source: https://github.com/vxcontrol/pentagi | License: MIT | Copyright 2025 PentAGI Development Team
// Provided via justclaw.it.com; keep this notice with the code.
package models
import "time"
// UserResource is the GORM model for a user-owned resource (file or directory)
// whose metadata lives in PostgreSQL and whose content (for files) is stored as
// a .blob file on disk keyed by MD5 hash.
//
// nolint:lll
type UserResource struct {
ID uint64 `form:"id" json:"id" gorm:"type:BIGINT;NOT NULL;PRIMARY_KEY;AUTO_INCREMENT"`
UserID uint64 `form:"user_id" json:"user_id" gorm:"type:BIGINT;NOT NULL;index"`
Hash string `form:"hash" json:"hash" gorm:"type:TEXT;NOT NULL;default:''"`
Name string `form:"name" json:"na
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key