<?php
/**
 * Class represents records from table aff_payout_detail
 * {autogenerated}
 * @property int $payout_detail_id PK
 * @property int $aff_id
 * @property int $payout_id FK aff_payout
 * @property float $amount
 * @property int $is_paid
 * @property string|null $receipt_id
 * {/autogenerated}
 */
class AffPayoutDetail extends Am_Record 
{
    /** @return User|null */
    function getAff()
    {
        return $this->getDi()->userTable->load($this->aff_id, false);
    }
}

/**
 * @extends Am_Table<AffPayoutDetail>
 * @method void deleteByPayoutId($value, $useObjects = true)
 * @method AffPayoutDetail[] findByPayoutId($value, $start = null, $count = null, $orderBy = null)
 */
class AffPayoutDetailTable extends Am_Table 
{
    protected $_key = 'payout_detail_id';
    protected $_table = '?_aff_payout_detail';
}
