Browse Source

create archive package, archive-entry model and add to .asd file.

This is a rough sketching out of what the model/data needs to look
like. This model is what will be connecting the site's archive (Nic's
artwork entries) with the Meilisearch service -- running alongside
each other. I don't know how much this model is going to change but
expect it to in future commits.
stable
Craig Oates 2 years ago
parent
commit
d6cc11dc03
  1. 1
      ritherdon-archive.asd
  2. 93
      src/models/archive.lisp

1
ritherdon-archive.asd

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

93
src/models/archive.lisp

@ -0,0 +1,93 @@
(in-package #:cl-user)
(defpackage #:archive
(:nicknames #:arc)
(:use #:cl
#:ritherdon-archive.db
#:app-constants
#:mito)
(:export #:archive-entry))
(in-package #:archive)
(defclass archive-entry ()
((title
:documentation "The title of the archive entry."
:col-type (or :text :null)
:initarg :title
:initform :null
:accessor title-of)
(search-id
:documentation "The Id. used in the Meilisearch database."
:col-type (or :integer :null)
:initarg :search-id
:initform :null
:accessor search-id-of)
(slug
:documentation "The slug, used as part of the URL, to access the entry."
:col-type (or :text :null)
:initarg :slug
:initform :null
:accessor slug-of)
(thumbnail
:documentation "The name of the thumbnail, for particular entry."
:col-type (or :text :null)
:initarg :thumbnail
:initform :null
:accessor thumbnail-of)
(thumbnail-url
:documentation "The URL for the thumbnail -- for Meilisearch."
:col-type (or :text :null)
:initarg :thumbnail-url
:initform :null
:accessor thumbnail-url-of)
(entry-type
:documentation "Specifies the type of entry (image, audio, video, text Etc.)"
:col-type (or :text :null)
:initarg :entry-type
:initform :null
:accessor entry-type-of)
(keywords
:documentation "Text for Meilisearch's filter options. An example
of how the keywords shold look is: 'art,welding,blue and
green,metal'. The 'blue and green' section is classed as one
keyword."
:col-type (or :text :null)
:initarg :keywords
:initform :null
:accessor keywords-of)
(year
:documentation "The year the entry was published. Used for
Meilisearch's filtering options."
:col-type (or :integer :null)
:initarg :year
:initform :null
:accessor year-of)
(month
:documentation "The month the entry was published. Used for
Meilisearch's filtering options."
:col-type (or :integer :null)
:initarg :month
:initform :null
:accessor month-of)
(day
:documentation "The day the entry was published. Used for
Meilisearch's filtering options."
:col-type (or :integer :null)
:initarg :day
:initform :null
:accessor day-of))
(:documentation "`ARCHIVE-ENTRY' represents the model used by Mito
to map database between the system and the 'archive_entry' table in
the database. This model contains data which is used more by the
Meilisearch instance attached to this website -- as a seperate
service.")
(:metaclass mito:dao-table-class))
Loading…
Cancel
Save