<?xml version="1.0" encoding="ISO-8859-1" ?>
<construct> 
    <module>ticket</module> 
    <table>ticket</table> 
    <dependancy/> 
    <cache>0</cache> 
    <order_by>status,date_last</order_by> 
    <limit>25</limit> 
    <index>
        <email>email</email>
        <piping_unique_id>piping_unique_id</piping_unique_id> 
        <subject>subject</subject>
        <last_reply>site_id,last_reply</last_reply>
        <priority>site_id,priority</priority>
        <staff>site_id,staff_id</staff>
        <dept>site_id,department_id</dept>
        <acct>site_id,account_id</acct>
        <expire>site_id,date_expire</expire>
        <fulltext_content>subject,body</fulltext_content>
        <account>account_id</account>
        <accountsite>site_id,account_id</accountsite>
    </index> 
    <field>
        <id>
            <type>I8</type>
            <unique>1</unique>
            <index>1</index>
        </id>
        <site_id>
            <type>I4</type>
            <index>1</index>
        </site_id>
        <date_orig>
            <type>I8</type>
            <convert>date-time</convert>
        </date_orig>
        <date_last>
            <type>I8</type>
            <convert>date-now</convert>
        </date_last>
        <date_expire>
            <type>I8</type> 
        </date_expire>
        <account_id>
            <type>I8</type>
            <asso_table>account</asso_table>
            <asso_field>email</asso_field>
        </account_id>
        <department_id>
            <type>I4</type>
            <asso_table>ticket_department</asso_table>
            <asso_field>name</asso_field>
            <validate>any</validate>
        </department_id>
        <staff_id>
            <type>I4</type>
            <asso_table>staff</asso_table>
            <asso_field>nickname</asso_field>
        </staff_id>
        <status>
            <type>C(4)</type>
            <validate>any</validate>
        </status>
        <priority>
            <type>C(4)</type>
            <validate>any</validate>
        </priority>
        <last_reply>
            <type>C(4)</type>
        </last_reply>
        <subject>
            <type>C(255)</type>
            <min_len>1</min_len>
            <max_len>255</max_len>
            <validate>any</validate>
        </subject>
        <body>
            <type>X2</type>
            <validate>any</validate>
        </body>
        <piping_unique_id>
            <type>C(32)</type>
        </piping_unique_id>
        <email>
            <type>C(128)</type>
        </email>
    </field>
    <!-- define all the methods for this class, and the fields they have access to, if applicable. -->
    <method>
        <add>id,site_id,date_orig,date_last,date_expire,account_id,department_id,staff_id,status,priority,subject,body,email,last_reply</add>
        <update>id,site_id,date_orig,date_last,date_expire,account_id,department_id,staff_id,status,priority,subject,body,email,last_reply</update>
        <delete>id,site_id,date_orig,date_last,date_expire,account_id,department_id,staff_id,status,priority,subject,body,email,last_reply</delete>
        <view>id,site_id,date_orig,date_last,date_expire,account_id,department_id,staff_id,status,priority,subject,body,email,last_reply</view>
        <search>id,site_id,date_orig,date_last,date_expire,account_id,department_id,staff_id,status,priority,subject,body,email,last_reply</search>
    </method>
    <!-- define the method triggers -->
    <trigger>0</trigger>
</construct>
