about summary refs log tree commit diff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/panettone/src/model.lisp7
1 files changed, 6 insertions, 1 deletions
diff --git a/web/panettone/src/model.lisp b/web/panettone/src/model.lisp
index 77a7cd6da92f..a3b75380c825 100644
--- a/web/panettone/src/model.lisp
+++ b/web/panettone/src/model.lisp
@@ -109,6 +109,9 @@ database connection."
   (declare (ignore initargs))
   (created-at->timestamp obj))
 
+(defun keyword->str (kw) (string-downcase (symbol-name kw)))
+(defun str->keyword (st) (alexandria:make-keyword (string-upcase st)))
+
 (defclass issue (has-created-at)
   ((id :col-type serial :initarg :id :accessor id)
    (subject :col-type string :initarg :subject :accessor subject)
@@ -121,7 +124,9 @@ database connection."
            :initarg :status
            :accessor status
            :initform :open
-           :col-default "open"))
+           :col-default "open"
+           :col-export keyword->str
+           :col-import str->keyword))
   (:metaclass dao-class)
   (:keys id)
   (:table-name issues)