;;; -*- mode: Lisp; Syntax: Common-Lisp; -*- ;;; ;;; Copyright (c) 2009 by the authors. ;;; ;;; See LICENCE for details. (in-package :hu.dwim.wiki) ;;;;;; ;;; Model (def (entity e) wiki-user (audited-object subject) ((user-name :reference #t :primary #t :type standard-text :documentation "Used to identify the user during the login process.") (administrator #f :primary #t :type boolean :documentation "Indicates if the user is an administrator or just a simple user. Only administrators can add new users to the system.") (email-address :type (or null email-address) :documentation "Notifications are sent to this email address.")) (:documentation "A user is a subject who can login to the system and edit pages and menu items.")) (def (entity e) wiki-page (audited-object) ((title :reference #t :primary #t :type standard-text :documentation "The title of the page.") (content :type html-text :documentation "The content of the page.")) (:documentation "A page is an XHTML document edited collaboratively by the users.")) (def (entity e) wiki-menu-item (audited-object) ((content :reference #t :primary #t :type standard-text :documentation "The label of the menu item.")) (:documentation "A menu item is an element in the menu hierarchy that is edited collaboratively by the users.")) (def association ((:slot referred-page :type (or null wiki-page) :documentation "The page that the menu item will show when activated.") (:slot referring-menu-items :type (set wiki-menu-item) :documentation "The menu items that show this page when activated.")) (:documentation "The menu items refer to pages that they show.")) (def association ((:slot parent-menu-item :type (or null wiki-menu-item) :documentation "The parent menu item in the menu hierarchy.") (:slot child-menu-items :type (set wiki-menu-item) :documentation "The child menu items in the menu hierarchy.")) (:documentation "The menu hierarchy is a tree like structure.")) (def (simple-entity-relationship-diagram e) wiki-diagram (wiki-user wiki-page wiki-menu-item) :documentation "The wiki is built from pages and a menu hierarchy that is collaboratively edited by the users.")