A website for producing interactive charts without writing a single line of code. Built with Common Lisp and Python. https://charts.craigoates.net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

63 lines
2.4 KiB

(defpackage #:file
(:use #:cl
#:user)
(:export #:file))
(in-package #:file)
(defclass file ()
(
;; ((id
;; :documentation "The row Id. of the file stored in the database."
;; :col-type :integer
;; :initarg :id
;; :accessor id-of)
(filename
:documentation "The name of the file."
:col-type (:varchar 128)
:initarg :filename
:accessor filename-of)
(username :col-type user)
(slug
:documentation "The dev. friendly way to refer to the file. It
mostly is about giving options to shorten the URL needed to get a
file if the `NAME' is long and makes it cumbersome to refer to it
in the back-end/admin. controls or URL."
:col-type (:varchar 128)
:initarg :slug
:accessor slug-of)
(content-type
:documentation "The type of the file -- not the file
extension. `CONTENT-TYPE' refers to the file being more of a 'text'
file or 'image' file than it being a '.md' file or '.png' file. The
main reason for this property is so I can represent the text files
with a graphic when managing the uploaded files to /storage."
:col-type (:varchar 128)
:initarg :content-type
:accessor content-type-of)
;; (created_at
;; :documentation "The date this meta-data was added to the
;; database. This does not automatically mean it is the same time the
;; data-file was uploaded to the /storage directory (within the
;; website)."
;; :col-type (:varchar 64)
;; :initform (local-time:now)
;; :initarg :created_at
;; :accessor created_at)
;; (updated_at
;; :documentation "The last time the file was modified in the
;; database. This does not automatically align with the actual
;; data-file associated with this meta-data file. So, be careful when
;; making assumption about this property."
;; :col-type (:varchar 64)
;; :initarg :updated_at
;; :accessor updated_at))
)
(:documentation "The model used to describe `FILE' table in the
database. Essentially, this is the meta-data for the files uploaded
to the website and stored in the /storage directory. This class is
for keeping track of the files in /storage via the website's
database. It does not represent the actual file it is paired
with. The intended usage for this class is to provide ways to manage
the files in /storage from the website's (admin.) back-end.")
(:metaclass mito:dao-table-class))