Files
libredesk/internal/media/models/models.go
T
Abhinav Raut 671b2371b5 feat: attachment download / view button on preview
- adds /compact apis for fetching teams and users
- adds form field to allow admin to set user password.
- fix: inline images for incoming email.
- save content id & disposition for each media.
- Update to schema.sql
2024-10-09 03:50:53 +05:30

32 lines
881 B
Go

package models
import (
"time"
"github.com/volatiletech/null/v9"
)
const (
ModelMessages = "messages"
ModelUser = "users"
DispositionInline = "inline"
)
// Media represents an uploaded object.
type Media struct {
ID int `db:"id" json:"id"`
CreatedAt time.Time `db:"created_at" json:"created_at"`
UUID string `db:"uuid" json:"uuid"`
Filename string `db:"filename" json:"filename"`
ContentType string `db:"content_type" json:"content_type"`
Model null.String `db:"model_type" json:"-"`
ModelID null.Int `db:"model_id" json:"-"`
Size int `db:"size" json:"size"`
Store string `db:"store" json:"store"`
Disposition string `db:"disposition" json:"disposition"`
URL string `json:"url"`
ContentID string `json:"-"`
Content []byte `json:"-"`
}