123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225 |
- <?php
- use app\model\AdminMenuModel;
- use app\model\CommonModel;
- use app\model\GroupModel;
- use app\model\RoleModel;
- use app\model\ThemeModel;
- return [
- //【通用】
- 'common' => [
- 'keyword|关键字' => 'chsDash|max:100',
- 'page|页码' => 'require|number|gt:0',
- 'size|每页数量' => 'require|number|elt:100',
- 'status|状态' => 'number|in:' . CommonModel::$status_normal . ',' . CommonModel::$status_disable,
- 'company_id|企业' => 'number|gt:0',
- 'card_id|卡类型' => 'number|gt:0',
- ],
- //【启禁用】
- 'status' => [
- 'id' => 'require|number|gt:0',
- 'status|状态' => 'require|number|in:' . CommonModel::$status_normal . ',' . CommonModel::$status_disable,
- ],
- //【登录】
- 'login' => [
- 'username|用户名' => 'require|max:255',
- 'password|密码' => 'require|max:255',
- ],
- //【版本】
- //新增版本
- 'createVersion' => [
- 'title|版本主题' => 'require|max:255',
- 'content|版本内容' => 'require|max:255',
- 'version|版本号' => 'require|max:255'
- ],
- //【菜单】
- //添加菜单
- 'menuAdd' => [
- 'menu_name|菜单名称' => 'require|max:255',
- 'menu_url|菜单地址' => 'max:255',
- 'menu_route|菜单路由' => 'requireWith:pid|max:255',
- 'menu_type|菜单类型' => 'number|in:' . AdminMenuModel::$type_1 . ',' . AdminMenuModel::$type_2,
- 'menu_img|菜单图片' => 'max:255',
- 'pid|父级id' => 'number|egt:0',
- 'private|是否私有' => 'number|in:' . AdminMenuModel::$is_private . ',' . AdminMenuModel::$not_private,
- 'weight|权重' => 'number|egt:0',
- ],
- //编辑菜单
- 'menuEdit' => [
- 'id' => 'require|number|gt:0',
- 'menu_name|菜单名称' => 'require|max:255',
- 'menu_url|菜单地址' => 'max:255',
- 'menu_route|菜单路由' => 'requireWith:pid|max:255',
- 'menu_type|菜单类型' => 'number|in:' . AdminMenuModel::$type_1 . ',' . AdminMenuModel::$type_2,
- 'menu_img|菜单图片' => 'max:255',
- 'pid|父级id' => 'number|egt:0',
- 'private|是否私有' => 'number|in:' . AdminMenuModel::$is_private . ',' . AdminMenuModel::$not_private,
- 'is_show|是否显示' => 'number|in:' . AdminMenuModel::$show . ',' . AdminMenuModel::$hide,
- 'weight|权重' => 'number|egt:0',
- ],
- //【视频】
- //添加视频
- 'videoAdd' => [
- 'video_name|视频名称' => 'require|max:255',
- 'video_url|视频地址' => 'require|max:255',
- 'video_img|视频封面' => 'require|max:255',
- 'weight|权重' => 'number|egt:0',
- 'remark|备注' => 'max:255',
- ],
- //编辑视频
- 'videoEdit' => [
- 'id' => 'require|number|gt:0',
- 'video_name|视频名称' => 'require|max:255',
- 'video_url|视频地址' => 'require|max:255',
- 'video_img|视频封面' => 'require|max:255',
- 'weight|权重' => 'number|egt:0',
- 'remark|备注' => 'max:255',
- ],
- //【批量添加视频】
- //添加
- 'videoGroupAdd' => [
- 'group_id|分组id' => 'require|number|gt:0',
- 'video_ids|视频id集合' => 'require|array|max:100',
- ],
- //【卡类型】
- //添加卡类型
- 'cardAdd' => [
- 'title|卡类型' => 'require|max:255'
- ],
- //编辑卡类型
- 'cardEdit' => [
- 'id' => 'require|number|gt:0',
- 'title|卡类型' => 'require|max:255'
- ],
- //【企业】
- //添加
- 'CompanyAdd' => [
- 'title|企业名称' => 'require|max:255',
- 'contacts|联系人' => 'require|max:255',
- 'mobile|联系方式' => 'require|mobile',
- 'remark|备注' => 'max:255',
- ],
- //【权限】
- 'actionAdd' => [
- 'menuid' => 'require|number|gt:0',
- 'action_code' => 'require|max:255',
- 'status|状态' => 'require|number|in:' . CommonModel::$status_normal . ',' . CommonModel::$status_disable,
- ],
- //【角色】
- 'roleList' => [
- 'name|角色名称' => 'max:255',
- 'level|角色等级' => 'number|in:' . implode(',', [RoleModel::$level_super_administrator, RoleModel::$level_administrator, RoleModel::$level_normal_role]),
- ],
- 'RoleAdd' => [
- 'name|角色名称' => 'require|max:255',
- 'level|角色等级' => 'require|number|in:' . implode(',', [RoleModel::$level_super_administrator, RoleModel::$level_administrator, RoleModel::$level_normal_role]),
- 'remark|备注' => 'max:255',
- 'action_data|功能权限' => 'require|array'
- ],
- //运营账号
- 'adminAdd' => [
- 'username|账号' => 'require|max:255',
- 'role_id|角色' => 'require|number|gt:0',
- 'card_id|卡类型' => 'require|array|max:100',
- ],
- //更改密码
- 'adminChangePasswod' => [
- 'id' => 'require|number|gt:0',
- 'new_password|新密码' => 'require|min:6|max:255',
- ],
- //【企业和卡类型组合】
- //添加
- 'GroupAdd' => [
- 'company_id|企业id' => 'require|number|gt:0',
- 'card_id|卡类型id' => 'require|number|gt:0',
- 'remark|备注' => 'max:255',
- ],
- //【公司商品】
- //添加
- 'CompanyGoodAdd' => [
- 'group_id|分组id' => 'require|number|gt:0',
- 'good_id|商品id' => 'require|array|max:100',
- ],
- //【商城商品库存】
- //添加
- 'InventoryShoppingAdd' => [
- 'list|商城商品库存列表' => 'require|array|max:100',
- ],
- //【兑换商品库存】
- //添加
- 'InventoryExchangeAdd' => [
- 'group_id|分组id' => 'require|number|gt:0',
- 'list|兑换商品库存列表' => 'require|array|max:100',
- ],
- //【账户】
- //添加
- 'AccountAdd' => [
- 'company_id|企业' => 'require|number|gt:0',
- 'card_id|卡类型' => 'require|number|gt:0',
- 'username|账户' => 'require|max:255',
- 'starttime|开始日期' => 'require|date|lt:expiretime',
- 'expiretime|结束日期' => 'require|date|gt:starttime',
- 'video_ids|视频id集合' => 'require|array|max:100',
- 'mobile|手机号' => 'mobile',
- 'name|姓名' => 'max:255',
- 'remark|备注' => 'max:255',
- ],
- //批量添加账户
- 'AccountBatchAdd' => [
- 'company_id|企业' => 'require|number|gt:0',
- 'card_id|卡类型' => 'require|number|gt:0',
- 'username_prefix|账户前缀' => 'require|max:255',
- 'username_year|账户年份' => 'require|number|length:2,4',
- 'starttime|开始日期' => 'require|date|lt:expiretime',
- 'expiretime|结束日期' => 'require|date|gt:starttime',
- ],
- //【服务】
- //添加
- 'ServiceAdd' => [
- 'company_id|企业' => 'require|number|gt:0',
- 'card_id|卡类型' => 'number|require|gt:0',
- 'original_price|原价' => 'require|float|gt:0|max:99999999.99',
- 'activity_price|活动价' => 'require|float|gt:0|max:99999999.99',
- 'title|服务名称' => 'require|max:255',
- 'content|服务介绍' => 'require|max:255',
- 'starttime|活动开始时间' => 'require|date|lt:endtime',
- 'endtime|活动结束时间' => 'require|date|gt:starttime',
- 'expiretime|服务到期时间' => 'require|date',
- 'remark|备注' => 'max:255',
- ],
- //【手机主题】
- //添加
- 'ThemeAdd' => [
- 'group_id|分组id' => 'require|number|gt:0',
- 'code|主题编号' => 'require|max:255',
- 'modular|模块' => 'require|array|length:4',
- ],
- //手机主题数据
- 'ThemeDataAdd' => [
- 'img|图片' => 'require|max:255',
- 'jump_type|跳转类型' => 'require|number|in:' . ThemeModel::$jump_type_external . ',' . ThemeModel::$jump_type_inside . ',' . ThemeModel::$jump_type_no,
- 'jump_param|跳转参数' => 'max:255',
- 'good_id|商品id' => 'number|gt:0'
- ],
- ];
|