<?xml version="1.0" encoding="utf-8"?>
<!-- Main MagicSmoke DB Definition WOLF
-
- - (c) Konrad Rosenbaum, 2009-2015
+ - (c) Konrad Rosenbaum, 2009-2016
- this file is protected under the GNU AGPLv3 or at your option any newer
- see COPYING.AGPL for details
-->
<DataBase
instance="db" schema="dbScheme" defaultUpdating="yes"
configTable="config" configKeyColumn="ckey" configValueColumn="cval"
- version="01.06" versionRow="MagicSmokeVersion">
+ version="01.07" versionRow="MagicSmokeVersion">
<AuditTables>
<Column name="audittime" type="int64">Time at which the change was made.
<Call lang="php" method="time()"/>
<!-- Event Definition MagicSmoke WOLF
- declares everything needed to define events
-
- - (c) Konrad Rosenbaum, 2009-2012
+ - (c) Konrad Rosenbaum, 2009-2016
- this file is protected under the GNU AGPLv3 or at your option any newer
- see COPYING.AGPL for details
-->
<!-- Order MagicSmoke WOLF
- Tables and Comm Objects for Orders, Tickets, Vouchers, etc.
-
- - (c) Konrad Rosenbaum, 2009-2012
+ - (c) Konrad Rosenbaum, 2009-2016
- this file is protected under the GNU AGPLv3 or at your option any newer
- see COPYING.AGPL for details
-->
additional tags for this item, can be used by scripts
</Column>
</Table>
+
+ <Table name="orderdocuments" backup="yes" audit="no" backupkey="orderid">
+ <Doc>Documents that refer to a specific order. E.g. invoices, Print@Home tickets, etc.</Doc>
+ <Column name="fileid" type="seq64" primarykey="yes"/>
+ <Column name="orderid" type="int32" foreignkey="order:orderid" notnull="yes"/>
+ <Column name="filename" type="string" notnull="yes"/>
+ <Column name="mtime" type="int64" notnull="yes">The time when the file was last modified.</Column>
+ <Column name="content" type="blob"/>
+ <Unique>orderid,filename</Unique>
+ </Table>
</Wolf>
<Include file="db/db.wolf"/>
<!-- configure output -->
- <QtClientOutput sourceDir="iface" subDir="wob" priInclude="wob.pri" classPrefix="M" clean="yes" transactionBase="MTransaction" scriptable="yes" enableExport="yes"/>
+ <QtClientOutput sourceDir="iface" subDir="wob" priInclude="wob.pri" classPrefix="M" clean="yes" transactionBase="MTransaction" enableExport="yes"/>
<PHPServerOutput sourceDir="www" subDir="inc/wob" extension=".php" clean="yes" transactionBase="MSmokeTransaction"/>
<HtmlOutput sourceDir="doc" subDir="wob" clean="yes"/>
<!-- SchemaOutput sourceDir="wob" filename="test.xsd" compound="cmp.xsd"/ -->
<Call lang="php" method="WOOrder::deletePayTypeTransaction($this);"/>
<Output/>
</Transaction>
+
+ <Transaction name="GetOrderDocumentNames" update="no">
+ <Doc>Gets the names of all files associated with the Order</Doc>
+ <Input>
+ <Var name="orderid" type="int"/>
+ </Input>
+ <Call lang="php" method="WOOrder::getOrderDocuments($this);"/>
+ <Output>
+ <Var name="filename" type="List:string"/>
+ </Output>
+ </Transaction>
+ <Transaction name="GetOrderDocument" update="no">
+ <Doc>Gets a document associated with an order.</Doc>
+ <Input>
+ <Var name="orderid" type="int"/>
+ <Var name="filename" type="string"/>
+ </Input>
+ <Call lang="php" method="WOOrder::getOrderDocument($this);"/>
+ <Output>
+ <Var name="content" type="blob"/>
+ </Output>
+ </Transaction>
+ <Transaction name="SetOrderDocument" update="yes">
+ <Doc>Stores a document associated with an order. Overwrites the document if it already exists, creates it otherwise.</Doc>
+ <Input>
+ <Var name="orderid" type="int"/>
+ <Var name="filename" type="string"/>
+ <Var name="content" type="blob"/>
+ </Input>
+ <Call lang="php" method="WOOrder::getOrderDocument($this);"/>
+ <Output/>
+ </Transaction>
+ <Transaction name="DeleteOrderDocument" update="yes">
+ <Doc>Deletes a document associated with an order. Produces an error if the document does not exist.</Doc>
+ <Input>
+ <Var name="orderid" type="int"/>
+ <Var name="filename" type="string"/>
+ </Input>
+ <Call lang="php" method="WOOrder::getOrderDocument($this);"/>
+ <Output/>
+ </Transaction>
+
+ <Transaction name="SendCustomerMail" update="no">
+ <Doc>Sends an eMail to a customer. Usually to update the customer about Order data.</Doc>
+ <Input>
+ <Var name="customerid" type="int">ID of the customer. Must be given! The mail address associated with the account is used.</Var>
+ <Var name="cc" type="List:string">Additional Cc addresses - usually extracted from the customer contact information.</Var>
+ <Var name="content" type="blob">Content of the eMail.</Var>
+ </Input>
+ <Call lang="php" method=";"/><!-- TODO -->
+ <Output/>
+ </Transaction>
</Wolf>