26 lines
830 B
PHP
Executable File
26 lines
830 B
PHP
Executable File
<?php
|
|
|
|
namespace Admin\Model;
|
|
use Think\Model;
|
|
|
|
/**
|
|
* 轮播图片模型
|
|
* @author Devil
|
|
* @blog http://gong.gg/
|
|
* @version 0.0.1
|
|
* @datetime 2016-12-01T21:51:08+0800
|
|
*/
|
|
class SlideModel extends CommonModel
|
|
{
|
|
// 数据自动校验
|
|
protected $_validate = array(
|
|
// 添加,编辑
|
|
array('name', '0,60', '{%slide_name_format}', 1, 'length', 3),
|
|
array('platform', array('pc','h5','alipay','wechat'), '{%common_platform_format}', 1, 'in', 3),
|
|
array('jump_url', '0,255', '{%common_jump_url_format}', 2, 'length', 3),
|
|
array('jump_url_type', array(0,1,2), '{%common_jump_url_type_format}', 1, 'in', 3),
|
|
array('images_url', 'require', '{%slide_images_url_format}', 1, '', 3),
|
|
array('is_enable', array(0,1), '{%common_enable_tips}', 1, 'in', 3),
|
|
);
|
|
}
|
|
?>
|