Browse Source

add files package (in /src/models and ritherdon-archive.asd file).

stable
Craig Oates 2 years ago
parent
commit
f5549e17a1
  1. 1
      ritherdon-archive.asd
  2. 35
      src/models/files.lisp

1
ritherdon-archive.asd

@ -54,6 +54,7 @@
(:file "models/user")
(:file "models/site-settings")
(:file "models/pages")
(:file "models/files")
(:file "auth")
(:file "validation")
(:file "nera") ; (Name of Database)

35
src/models/files.lisp

@ -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…
Cancel
Save