Craig Oates
2 years ago
2 changed files with 36 additions and 0 deletions
@ -0,0 +1,35 @@ |
|||||||
|
(in-package #:cl-user) |
||||||
|
(defpackage #:files |
||||||
|
(:use #:cl |
||||||
|
#:ritherdon-archive.db |
||||||
|
#:app-constants |
||||||
|
#:mito) |
||||||
|
(:export #:storage-file)) |
||||||
|
(in-package #:files) |
||||||
|
|
||||||
|
(defclass storage-file () |
||||||
|
((name |
||||||
|
:documentation "The filename of the file being stored in /storage/media." |
||||||
|
:col-type (or :text :null) |
||||||
|
:initarg :name |
||||||
|
:initform :null |
||||||
|
:accessor name-of) |
||||||
|
|
||||||
|
(slug |
||||||
|
:documentation "The slugified version of the file's `NAME'. This is what is |
||||||
|
used when constructing links and accessing the file from the browser." |
||||||
|
:col-type (or :text :null) |
||||||
|
:initarg :slug |
||||||
|
:initform :null |
||||||
|
:accessor slug-of) |
||||||
|
|
||||||
|
(file-type |
||||||
|
:documentation "The MIME type of the file (E.G. 'image/png." |
||||||
|
:col-type (or :text :null) |
||||||
|
:initarg :file-type |
||||||
|
:initform :null |
||||||
|
:accessor file-type-of)) |
||||||
|
|
||||||
|
(:documentation "Model describing the 'storage_file' table in the database -- |
||||||
|
used by Mito.") |
||||||
|
(:metaclass mito:dao-table-class)) |
Loading…
Reference in new issue