blob: 33c1ab23356e4b5679c3d972b36d77f57623b422 (
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
;;;; vampire.lisp
(in-package #:vampire)
;;; SYSTEM CONFIG COMPONENT
(defvar *config* nil)
(defclass/std config ()
((datastore-directory :ir
:std #P"/srv/parasite/store/")
(port :ir
:std 4919)
(media-directory :ir
:std #P"/srv/parasite/media/")))
;;; RESOURCE MODEL
(defclass/bknr keyed ()
((key
:r :std (nuid)
:index-type string-unique-index
:index-reader object-with-key)))
(defclass/bknr content (keyed)
((title :with :std "")
(user :with
:ri
:std (error "A USER is required to have created the content.")
:index-type hash-index
:index-reader content-by-user)))
(defclass/bknr playlist (content)
((tracks editors :with :std (list))))
(defclass/bknr track (content)
((source media artist album :with)
(playlists :with :std (list) :doc "Playlists in which this track appears.")
(status :a :with
:std :uninitialized
:doc ":uninitialized, :acquiring, :available, :error-aquiring")))
(defclass/bknr user (keyed)
((name :with :std "")
(pw pwhash :with )
(playlists :with :std (list) :doc "Playlists made by this user")))
(defclass/std media (bknr.datastore:blob)
((track :with))
(:metaclass persistent-class))
;;; RESOURCE ACCESS PROTOCOL
|