Craig Oates
2 years ago
1 changed files with 48 additions and 0 deletions
@ -0,0 +1,48 @@ |
|||||||
|
(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)) |
Loading…
Reference in new issue