<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:ns2="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="YONDA_SMS_SEND_RULES">
    <bm:fields>
        <bm:field name="sms_send_rules_id" databaseType="NUMBER" datatype="java.lang.Long"/>
        <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long"/>
        <bm:field name="cell_phone" databaseType="VARCHAR2" datatype="java.lang.String"/>
        <bm:field name="five_day_flag" databaseType="VARCHAR2" datatype="java.lang.String"/>
        <bm:field name="today_flag" databaseType="VARCHAR2" datatype="java.lang.String"/>
        <bm:field name="over_three_day_flag" databaseType="VARCHAR2" datatype="java.lang.String"/>
        <bm:field name="contract_number" expression="(select a.contract_number from con_contract a where a.contract_id=t1.contract_id)" forInsert="false" forQuery="true"/>
        <bm:field name="tenant_name" expression="(select b.bp_name from con_contract a ,hls_bp_master b  where a.bp_id_tenant=b.bp_id and a.contract_id=t1.contract_id)" forInsert="false" forQuery="true"/>
    </bm:fields>
    <bm:primary-key>
        <bm:pk-field name="sms_send_rules_id"/>
    </bm:primary-key>
    <bm:features>
        <ns2:sequence-pk/>
        <f:standard-who/>
    </bm:features>
    <bm:query-fields>
        <bm:query-field name="contract_number" queryExpression="(select a.contract_number from con_contract a where a.contract_id=t1.contract_id) like ${@contract_number}"/>
    </bm:query-fields>
</bm:model>
