<?php
if (!defined("ROOT_PATH")) {
    header("HTTP/1.1 403 Forbidden");
    exit;
}
class pjVoucherUsageModel  extends pjAppModel
{
    /**
     * The name of table's primary key. If PK is over 2 or more columns set this to boolean null
     *
     * @var string
     * @access public
     */
    var $primaryKey = 'id';
    /**
     * The name of table associate with current model
     *
     * @var string
     * @access protected
     */
    var $table = 'voucher_usage';
    /**
     * Table schema
     *
     * @var array
     * @access protected
     */
    protected $schema = array(
        array('name' => 'id', 'type' => 'int'),
        array('name' => 'voucher_id', 'type' => 'int'),
        array('name' => 'user_id', 'type' => 'int'),
        array('name' => 'order_id', 'type' => 'int'),
        array('name' => 'used_on', 'type' => 'datetime')
    );


    public static function factory($attr = array())
    {
        return new pjVoucherUsageModel($attr);
    }
}
