<?xml version="1.0" encoding="UTF-8"?>
<ROOT>
    <BUSINESSCLASS  name="MessageTemplate"  package="performa.orm">
        
        <IMPORT value="performa.orm.types.*"/>
        <IMPORT value="performa.orm.*"/>
        
        <TABLE  name="tl_message_template" tablePrefix="object"    polymorphic="FALSE">
            <ATTRIB name="MessageID"            type="Integer"              dbcol="message_id"          mandatory="true"    defaultValue="1"/>
            <ATTRIB name="TemplateName"         type="String"               dbcol="template_name"       mandatory="true"    length="200"        />
            <ATTRIB name="Subject"              type="String"               dbcol="subject"             mandatory="true"    length="200"        />
            <ATTRIB name="ApplicationStatus"    type="ApplicationStatus"    dbcol="application_status"  mandatory="true"    defaultValue="ApplicationStatus.DRAFT"  attribHelper="EnumeratedAttributeHelper"    />
            <ATTRIB name="DelayHrs"             type="Integer"              dbcol="delay_hrs"           mandatory="false"   defaultValue="0"  />
            <ATTRIB name="DelayMin"             type="Integer"              dbcol="delay_min"           mandatory="false"   defaultValue="0"  />
            <ATTRIB name="Variance"             type="Integer"              dbcol="variance"            mandatory="false"   defaultValue="0"    />
            <ATTRIB name="BusinessHoursOnly"    type="Boolean"              dbcol="business_hours_only" mandatory="false"   defaultValue="Boolean.FALSE"/>
            <ATTRIB name="MessageContent"       type="String"               dbcol="message_content"     mandatory="true"    />
            <ATTRIB name="TemplateType"         type="TemplateType"         dbcol="template_type"       attribHelper="EnumeratedAttributeHelper"        mandatory="false"/>
            <ATTRIB name="IsGlobalTemplate"     type="Boolean"              dbcol="is_global_template"  mandatory="false"/>
            <ATTRIB name="IsSystemGenerated"    type="Boolean"              dbcol="is_system_generated" mandatory="false"   defaultValue="Boolean.FALSE"/>

            <SINGLEREFERENCE    name="HiringTeam"   type="HiringTeam"       dbcol="hiring_team_id"      backreferenceName="MessageTemplates"    mandatory="false"/>
            
        </TABLE>
        
        <SEARCH type="All" paramFilter="tl_message_template.object_id is not null"  />
        
    </BUSINESSCLASS>
</ROOT>