Public archive for the Return to Ritherdon project.
https://www.nicolaellisandritherdon.com
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.
48 lines
1.5 KiB
48 lines
1.5 KiB
(in-package #:cl-user) |
|
(defpackage #:pages |
|
(:use #:cl |
|
#:ritherdon-archive.db |
|
#:mito |
|
#:app-constants) |
|
(:export #:page)) |
|
(in-package #:pages) |
|
|
|
(defclass page () |
|
((title |
|
:documentation "The title of the page." |
|
:col-type (or :text :null) |
|
:initarg :title |
|
:initform :title |
|
:accessor title-of) |
|
|
|
(slug |
|
:documentation "The slugified version of the page `TITLE'. This is what is |
|
used when constructing links and accessing the page from the browser." |
|
:col-type (or :text :null) |
|
:initarg :slug |
|
:initform :null |
|
:accessor slug-of) |
|
|
|
(enable-nav-menu |
|
:documentation |
|
"Boolean value stating if `PAGE' should be included on site's nav. menu." |
|
:col-type (or :integer :null) |
|
:initarg :enable-nav-menu |
|
:initform +false+ ;SQLite 0 -> false 1 -> true. |
|
:accessor enable-nav-menu-p) |
|
|
|
(can-delete |
|
:documentation |
|
"Specifies if the page can be deleted from the database. This is for |
|
'hard-coded' pages such as the 'archive' and 'pages'. The user won't make |
|
these pages they come as part of the website which the use can add to the |
|
nav. menu." |
|
:col-type (or :integer :null) |
|
:initarg :can-delete |
|
:initform +false+ ;SQLite 0 -> false 1 -> true. |
|
:accessor can-delete-p)) |
|
|
|
(:documentation "`PAGE' represents the meta-data for the pages made by the |
|
`USER' which are stored in the database. The actual pages are stored in the |
|
/storage/pages directory.") |
|
(:metaclass mito:dao-table-class))
|
|
|