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.
 
 
 
 
 
 

41 lines
1.2 KiB

(defpackage #:user
(:use #:cl
#:ritherdon-archive.db
#:mito
#:app-constants)
(:export #:user))
(in-package #:user)
(defclass user ()
((username
:documentation "The name the user uses to log into the website."
:col-type :text
:initarg :username
:accessor username-of)
(display-name
:documentation "The name used in the website GUI (the pretty name)."
:col-type :text
:initarg :display-name
:accessor display-name-of)
(password
:documentation "The user's password."
:col-type :text
:initarg :password
:accessor password-of)
(administrator
:documentation "States if user has admin. priveledges. At the time
of writing (11/09/2022), SQLite is the current database and it
does not have a Boolean datatype so '0' represents 'false' and '1'
represents 'true'. You will not come across '0' or '1' in the code
because of how mito maps the code to the database. But, you will
see it in the database if you view it directly."
:col-type :integer
:initarg :administrator
:initform +false+ ; SQLite: 0 -> false 1 -> true.
:accessor is-administrator-p))
(:documentation "The model used to describe the `USER' table in the database")
(:metaclass mito:dao-table-class))