package model import ( "time" ) // StatusUserDeleted marks a file that has been deleted by the user (soft delete). const StatusUserDeleted = "user_deleted" // File represents a file or directory entry in the virtual filesystem. type File struct { ID string `gorm:"primaryKey;type:varchar(36)"` UserID string `gorm:"index;uniqueIndex:idx_user_parent_name,priority:1;type:varchar(36);not null"` ParentID *string `gorm:"index;uniqueIndex:idx_user_parent_name,priority:2;type:varchar(36)"` Name string `gorm:"type:varchar(255);not null;uniqueIndex:idx_user_parent_name,priority:3"` Size int64 `gorm:"default:0"` MimeType string `gorm:"type:varchar(127)"` StoragePath string `gorm:"type:varchar(512)" json:"-"` Hash string `gorm:"type:varchar(64)" json:"-"` Status string `gorm:"type:varchar(32);not null;default:active;index" json:"-"` IsDir bool `gorm:"default:false"` CreatedAt time.Time UpdatedAt time.Time }