models

package
v1.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2026 License: MIT Imports: 1 Imported by: 0

README

models

Shared GORM database models.

Schema Domains

storage.*
  • StorageFile - File metadata for MinIO storage

Usage

import "github.com/adeptry-app/go-common/models"

var file models.StorageFile
db.First(&file, id)

Messaging models live in the messaging repos, not here.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StorageFile

type StorageFile struct {
	ID        int64     `json:"id" gorm:"primaryKey"`
	UserID    int64     `json:"-" gorm:"column:user_id"`
	S3Key     string    `json:"-" gorm:"column:s3_key"`
	S3Bucket  string    `json:"-" gorm:"column:s3_bucket"`
	FileName  string    `json:"fileName" gorm:"column:file_name"`
	FileSize  int64     `json:"fileSize" gorm:"column:file_size"`
	MimeType  string    `json:"mimeType" gorm:"column:mime_type"`
	FileType  string    `json:"fileType" gorm:"column:file_type"`
	URL       string    `json:"url,omitempty" gorm:"-"` // Computed field
	CreatedAt time.Time `json:"createdAt" gorm:"column:created_at"`
}

func (StorageFile) TableName

func (StorageFile) TableName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL