blob: 8ee7f4ded8f3e90066b7a303a60881abae8e9220 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
(defpackage :cl-bbs/models
(:use :cl)
(:export #:thread
#:post
#:board
#:headline
#:posts
#:truncated
#:content
#:date
#:messages
#:vip
#:name))
(in-package :cl-bbs/models)
(defclass post ()
((id :initarg :id :accessor post-id)
(date :initarg :date :accessor post-date)
(vip :initarg :vip :accessor post-vip :initform nil)
(content :initarg :content :accessor post-content))
(:documentation "Represents a single post on a message board."))
(defclass thread ()
((id :initarg :id :accessor thread-id)
(headline :initarg :headline :accessor thread-headline)
(date :initarg :date :accessor thread-date)
(messages :initarg :messages :accessor thread-messages :initform 1)
(truncated :initarg :truncated :accessor thread-truncated :initform nil)
(posts :initarg :posts :accessor thread-posts :initform nil))
(:documentation "Represents a thread consisting of a series of posts."))
(defclass board ()
((name :initarg :name :accessor board-name))
(:documentation "Represents a message board."))
|