more wolf docu
authorkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Sun, 6 Feb 2011 10:53:23 +0000 (10:53 +0000)
committerkonrad <konrad@6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33>
Sun, 6 Feb 2011 10:53:23 +0000 (10:53 +0000)
git-svn-id: https://silmor.de/svn/softmagic/smoke/trunk@719 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33

wob/db/audit.wolf
wob/db/basics.wolf
wob/db/cart.wolf
wob/db/customer.wolf

index fd19b4e..063e8d9 100644 (file)
@@ -8,11 +8,12 @@
   -->
 <Wolf>
        <Table name="documentlog" backup="yes">
-               <Column name="docid" type="seq64" primarykey="yes"/>
-               <Column name="logtime" type="int64" notnull="yes"/>
-               <Column name="uname" type="string:64" foreignkey="user:uname" null="yes"/>
-               <Column name="orderid" type="int32" foreignkey="order:orderid" null="yes"/>
-               <Column name="doctype" type="string:32" notnull="yes"/>
-               <Column name="docbody" type="blob" notnull="yes"/>
+               <Doc>Storage space for printed documents. To be filled by the client whenever something is printed, to be emptied by auditors.</Doc>
+               <Column name="docid" type="seq64" primarykey="yes">automatic key for this table</Column>
+               <Column name="logtime" type="int64" notnull="yes">time at which the data was logged</Column>
+               <Column name="uname" type="string:64" foreignkey="user:uname" null="yes">user who printed the document</Column>
+               <Column name="orderid" type="int32" foreignkey="order:orderid" null="yes">the order it refers to</Column>
+               <Column name="doctype" type="string:32" notnull="yes">type of document (bill, eventoverview, etc.)</Column>
+               <Column name="docbody" type="blob" notnull="yes">the document</Column>
        </Table>
 </Wolf>
\ No newline at end of file
index 8924041..d9f4feb 100644 (file)
@@ -8,8 +8,9 @@
   -->
 <Wolf>
        <Table name="config" backup="yes">
-               <Column name="ckey" type="string:32" primarykey="yes"/>
-               <Column name="cval" type="string"/>
+               <Doc>Configuration store. Configuration consists of key-value-pairs.</Doc>
+               <Column name="ckey" type="string" primarykey="yes">the configuration key</Column>
+               <Column name="cval" type="string">the configuration value</Column>
                
                <Preset><V col="ckey" val="MagicSmokeVersion"/><V col="cval" code="$this->version()"/></Preset>
                <Preset><V col="ckey" val="ValidVouchers"/><V col="cval" val="1000 2000 2500 5000"/></Preset>
index 24354bb..52c6683 100644 (file)
@@ -8,6 +8,7 @@
    -->
 <Wolf>
        <Table name="cart" backup="no">
+               <Doc>web interface: stores a customers cart object</Doc>
                <Column name="cartid" type="string:32" primarykey="yes">
                        the cookie for this cart
                        <Call lang="php" method="WebCart::getNewCartId()"/>
                </Column>
        </Table>
        <Table name="cartticket" backup="no">
-               <Column name="cartid" type="string:32" notnull="yes" foreignkey="cart:cartid" primarykey="yes"/>
+               <Doc>web interface: stores the tickets in the cart</Doc>
+               <Column name="cartid" type="string:32" notnull="yes" foreignkey="cart:cartid" primarykey="yes">the cart the ticket is in</Column>
                <!--tickets in the cart-->
-               <Column name="eventid" type="int32" notnull="yes" foreignkey="event:eventid" primarykey="yes"/>
-               <Column name="pricecategoryid" type="int32" foreignkey="pricecategory:pricecategoryid" primarykey="yes"/>
-               <Column name="amount" type="int32" notnull="yes"/>
+               <Column name="eventid" type="int32" notnull="yes" foreignkey="event:eventid" primarykey="yes">the event the ticket is for</Column>
+               <Column name="pricecategoryid" type="int32" foreignkey="pricecategory:pricecategoryid" primarykey="yes">the price category of the ticket</Column>
+               <Column name="amount" type="int32" notnull="yes">amount of tickets of this type in the cart</Column>
                <!-- Column name="seating" type="string:32" null="yes"/ -->
        </Table>
        <Table name="cartvoucher" backup="no">
-               <Column name="cvid" type="seq64" primarykey="yes"/>
-               <Column name="cartid" type="string:32" notnull="yes" foreignkey="cart:cartid"/>
+               <Doc>web interface: stores vouchers in the cart</Doc>
+               <Column name="cvid" type="seq64" primarykey="yes">simple counter for primary key</Column>
+               <Column name="cartid" type="string:32" notnull="yes" foreignkey="cart:cartid">the cart this voucher is in</Column>
                <Column name="value" type="int32" notnull="yes">voucher value in cents</Column>
        </Table>
        <Table name="cartitem" backup="no">
-               <Column name="ciid" type="seq64" primarykey="yes"/>
-               <Column name="cartid" type="string:32" notnull="yes" foreignkey="cart:cartid"/>
-               <Column name="productid" type="int32" foreignkey="product:productid" notnull="yes"/>
-               <Column name="amount" type="int32" notnull="yes"/>
+               <Doc>web interface: shop items in the cart</Doc>
+               <Column name="ciid" type="seq64" primarykey="yes">simple counter for a primary key</Column>
+               <Column name="cartid" type="string:32" notnull="yes" foreignkey="cart:cartid">the cart it is in</Column>
+               <Column name="productid" type="int32" foreignkey="product:productid" notnull="yes">the product being purchased</Column>
+               <Column name="amount" type="int32" notnull="yes">amount of items of this type</Column>
        </Table>
        
        <Table name="websession" backup="no">
+               <Doc>web interface: customer session - this persists beyond carts, so the customer can retrieve other info</Doc>
                <Column name="sessionid" type="string:64" primarykey="yes">
+                       ID of this session, automatically generated and then stored in a cookie
                        <Call lang="php" method="WOWebSession::getNewSessionId()"/>
                </Column>
                <!--/customer-->
-               <Column name="customerid" type="int32" null="yes" foreignkey="customer:customerid"/>
+               <Column name="customerid" type="int32" null="yes" foreignkey="customer:customerid">if logged in - the customer</Column>
                <!--unix timestamp at which to delete this session-->
-               <Column name="timeout" type="int64" notnull="yes"/>
+               <Column name="timeout" type="int64" notnull="yes">the time when the session will be deleted, updated whenever the session is used</Column>
        </Table>
 </Wolf>
\ No newline at end of file
index d5d7de1..4366860 100644 (file)
@@ -8,30 +8,33 @@
   -->
 <Wolf>
        <Table name="country">
-               <Column name="countryid" type="string:3" primarykey="yes"/>
-               <Column name="countryname" type="string:64" notnull="yes"/>
+               <Doc>countries for addresses</Doc>
+               <Column name="countryid" type="string:3" primarykey="yes">abbreviated form of the country name (eg. "de", "us")</Column>
+               <Column name="countryname" type="string:64" notnull="yes">long form of the country name (e.g. "Germany", "United States of America")</Column>
                <!-- TODO: add shipping info -->
                <Preset><V col="countryid" val="de"/><V col="countryname" val="Germany"/></Preset>
                <Preset><V col="countryid" val="at"/><V col="countryname" val="Austria"/></Preset>
                <Preset><V col="countryid" val="ch"/><V col="countryname" val="Switzerland"/></Preset>
        </Table>
        <Table name="customer" backup="yes">
-               <Column name="customerid" type="seq32" primarykey="yes"/>
+               <Doc>customer data, base table</Doc>
+               <Column name="customerid" type="seq32" primarykey="yes">ID for the customer</Column>
                <!--main data-->
-               <Column name="title" type="string" notnull="yes"/>
-               <Column name="firstname" type="string" notnull="yes"/>
-               <Column name="name" type="string" notnull="yes"/>
-               <Column name="comments" type="text"/>
+               <Column name="title" type="string" notnull="yes">part of the name: titles, like "Mr.", "Prof.", etc.</Column>
+               <Column name="firstname" type="string" notnull="yes">first name(s) of the customer</Column>
+               <Column name="name" type="string" notnull="yes">(second/family) name of the customer</Column>
+               <Column name="comments" type="text">comments about the customer</Column>
                <!--online login data-->
-               <Column name="email" type="string" null="yes"/>
-               <Column name="passwd" type="string:64" null="yes"/> <!-- salted SHA-1 hash of passwd -->
+               <Column name="email" type="string" null="yes">mail address, used as contact by automatic mails and as login name</Column>
+               <Column name="passwd" type="string:64" null="yes">salted SHA-1 hash of customers login password</Column>
                <!-- password reset -->
-               <Column name="rstcode" type="string" null="yes"/>
-               <Column name="rsttill" type="int64" null="yes"/>
+               <Column name="rstcode" type="string" null="yes">reset code, used when the customer forgot the password</Column>
+               <Column name="rsttill" type="int64" null="yes">timer until which the reset code is valid</Column>
                <!-- customer flags, like newsletter, etc. -->
-               <Column name="cflags" type="string" null="yes"/>
+               <Column name="cflags" type="string" null="yes">flags of the customer, these are not to be confused with user flags, instead they can be set by the customer eg. to get a newsletter</Column>
        </Table>
        <Table name="address" backup="yes">
+               <Doc>customer data: addresses</Doc>
                <Column name="addressid" type="seq64" primarykey="yes"/>
                <Column name="customerid" type="int32" foreignkey="customer:customerid" notnull="yes"/>
                <Column name="lastused" type="int64" null="yes"/>