<?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="StripeCoupon" package="performa.orm">
        
        <IMPORT value="performa.orm.types.*"/>
        
        <TABLE  name="tl_coupon" tablePrefix="object">
            
            <ATTRIB name="CouponCode"       type="String"           dbcol="coupon_code"         mandatory="true"    length="100"    />
            <ATTRIB name="PercentageOff"    type="Double"           dbcol="percentage_off"      />
            <ATTRIB name="DurationInMonths" type="Integer"          dbcol="duration_in_months"  />
            <ATTRIB name="CouponDuration"   type="CouponDuration"   dbcol="coupon_duration"     attribHelper="EnumeratedAttributeHelper"    />
            <ATTRIB name="RedeemBy"         type="Date"             dbcol="redeem_by"           />
            <ATTRIB name="MaxRedemptions"   type="Integer"          dbcol="max_redemptions"     />
            <ATTRIB name="TimesRedeemed"    type="Integer"          dbcol="times_redeemed"      />

        </TABLE>
        
        <SEARCH type="All"  paramFilter="tl_coupon.object_id is not null"    >
        </SEARCH>
        
    </BUSINESSCLASS>
    
</ROOT>