<?xml version="1.0" encoding="UTF-8"?>

<ROOT xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='http://www.oneit.com.au/schemas/5.2/BusinessObject.xsd'>

    <BUSINESSCLASS  name="SentEmail"   package="performa.orm">
        
        <IMPORT value="performa.orm.types.*"/>
        
        <TABLE  name="tl_sent_email" tablePrefix="object">
                        
            <ATTRIB name="Subject"              type="String"               dbcol="subject"             mandatory="true"    length="200"    />
            <ATTRIB name="SentDate"             type="Date"                 dbcol="sent_date"           mandatory="true"    />
            <ATTRIB name="ApplicationStatus"    type="ApplicationStatus"    dbcol="application_status"  mandatory="true"    attribHelper="EnumeratedAttributeHelper"    />
            <ATTRIB name="MessageContent"       type="String"               dbcol="message_content"     mandatory="true"    />
            <ATTRIB name="EmailTo"            	type="String"               dbcol="email_to"            mandatory="true"    />

            <SINGLEREFERENCE    name="JobApplication"   type="JobApplication"   dbcol="job_application_id"      backreferenceName="SentEmails"  mandatory="true"/>
            
        </TABLE>
        
        <SEARCH type="All"  paramFilter="tl_scheduled_email.object_id is not null"   orderBy="tl_scheduled_email.object_id">
        </SEARCH>
        
    </BUSINESSCLASS>
    
</ROOT>