mirror of
https://github.com/abhinavxd/libredesk.git
synced 2026-10-23 04:55:22 +00:00
671b2371b5
- 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
32 lines
881 B
Go
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:"-"`
|
|
}
|