<?php
/**
 * 表模型 ads 
 * @copyright reginx.com
 * @Created By Reginx tab tool
 */
class ads_tab extends tab {
    public $default = array(
        'adate'     => REQUEST_TIME,
        'status'    => 0
    );
    
    /**
     * 过滤规则
     *
     * @var unknown_type
     */
    public $filter = array(
        'name'      => array('filter' , 'text'),
        'ctype'     => array('filter' , 'int'),
        'location'  => array('filter' , 'int'),
        'status'    => array('filter' , 'int'),
        'stat'      => array('filter' , 'int'),
        'adate'     => array('filter' , 'timestamp'),
        'desc'      => array('filter' , 'code'),
    );
    
    /**
     * 验证规则
     *
     * @var unknown_type
     */
    public $validate = array(
        array(
            'key'   => 'name',
            'type'  => 0,
            'rule'  => 'require',
            'msg'   => '请输入广告名称!'
        ),
        array(
            'key'   => 'ctype',
            'type'  => 0,
            'rule'  => 'number',
            'msg'   => '请选择类型!'
        ),
        array(
            'key'   => 'location',
            'type'  => 0,
            'rule'  => 'number',
            'msg'   => '请选择位置!'
        ),
        array(
            'key'   => 'desc',
            'type'  => 0,
            'rule'  => 'require',
            'msg'   => '请选择位置!'
        ),
    );
    
}
?>