<?php

return array (
   'name' => 'FastAdmin',
   'beian' => '',
   'cdnurl' => '',
   'version' => '1.0.1',
   'timezone' => 'Asia/Shanghai',
   'forbiddenip' => '',
   'languages' =>
   array (
       'backend' => 'zh-cn',
       'frontend' => 'zh-cn',
   ),
   'fixedpage' => 'dashboard',
   'categorytype' =>
   array (
       'default' => 'Default',
       'page' => 'Page',
       'article' => 'Article',
       'test' => 'Test',
   ),
  'configgroup' => 
   array (
       'basic' => 'Basic',
       'email' => 'Email',
       'dictionary' => 'Dictionary',
       'user' => 'User',
       'example' => 'Example',
   ),
   'mail_type' => '1',
   'mail_smtp_host' => 'smtp.qq.com',
   'mail_smtp_port' => '465',
   'mail_smtp_user' => '10000',
   'mail_smtp_pass' => 'password',
   'mail_verify_type' => '2',
   'mail_from' => '10000@qq.com',
   'raw' => array(
       'app_id' => 'wxcce140865f93090b',//客户app_id
       'secret' => '3356ffb367f67bfba05ab17cfddee89f',//客户秘钥
   ),
//   'raw' => [
//       'app_id' => 'wxcce140865f93090b',//我的app_id
//       'secret' => '3356ffb367f67bfba05ab17cfddee89f',//我的秘钥
//    ],
   //商品正常状态
   'goods_status' => 0,
   //取消订单状态
    'cancel_status' => -1,
    //订单状态
    'order_status' => [0,1,2,3],
   //分页限制数量
   'page_limit' => 10,
   //消息已读
    'is_read' => 1,

   //设置积分规则(分享购买,分享卖废品)
    'share_purchase' => 150,
    'share_sell' => 50,
   //验证规则
    'user_id' => [
        'rule' => [
            'off_uid'              => 'require|number',
            'page'                 => 'require|number',
        ],
        'msg' => [
            'off_uid.require'      => '下线用户id不能为空',
            'off_uid.number'       => '下线用户id必须是数字',
            'page.require'         => '页码不能为空',
            'page.number'          => '页码必须是数字',
        ]
    ],
   'user' => [
       'rule' => [
           'code'       => 'require',
           'nickname'   => 'require',
           'avatar'     => 'require',
       ],
       'msg' => [
           'name.require'     => '昵称不能为空',
           'code.require'     => 'code码不能为空',
           'avatar'           => '头像不能为空',
       ]
   ],
   'person' => [
       'rule' => [
           'username'             => 'require|max:20',
           'mobile'               => 'require|regex:/^1[3-8]{1}[0-9]{9}$/',
           'address'              => 'require|max:40',
           'id_num'               => ['require','regex'=>'/^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/'],
           'id_img'               => 'require',
       ],
       'msg' => [
           'username.require'     => '姓名不能为空',
           'username.max'         => '姓名最多不能超过20个字符',
           'mobile.require'       => '手机号不能为空',
           'mobile'               => '手机号格式不正确',
           'address.require'      => '地址不能为空',
           'address.max'          => '地址最多不能超过40个字符',
           'id_num.require'       => '身份证号不能为空',
           'id_num'               => '身份证号格式不正确',
           'id_img.require'       => '身份证件照片不能为空'
       ]
   ],
   'company' => [
       'rule' => [
           'username'             => 'require|max:20',
           'mobile'               => 'require|regex:/^1[3-8]{1}[0-9]{9}$/',
           'address'              => 'require|max:40',
           'company_name'         => 'require|max:30',
           'license_num'          => 'require|max:50',
           'license_img'          => 'require'
       ],
       'msg' => [
           'username.require'     => '姓名不能为空',
           'username.max'         => '姓名最多不能超过20个字符',
           'mobile.require'       => '手机号不能为空',
           'mobile'               => '手机号格式不正确',
           'address.require'      => '地址不能为空',
           'address.max'          => '地址最多不能超过40个字符',
           'company_name.require' => '公司名称不能为空',
           'company_name.max'     => '公司名称最多不能超过30个字符',
           'license_num.require'  => '营业执照号不能为空',
           'license_num.max'      => '营业执照号最多不能超过50个字符',
           'license_img'          => '营业执照照片不能为空'
       ]
   ],
   'sell' => [
        'rule' => [
            'fullname'             => 'require|max:20',
            'address'              => 'require|max:40',
            'description'          => 'require|max:200',
            'pre_date'             => 'require|date',
            'pre_time'             => 'require|date',
            'images'               => 'require'
        ],
        'msg' => [
            'fullname.require'     => '姓名不能为空',
            'fullname.max'         => '姓名最多不能超过20个字符',
            'address.require'      => '地址不能为空',
            'address.max'          => '地址最多不能超过40个字符',
            'description.require'  => '废品描述不能为空',
            'description.max'      => '废品描述最多不能超过200个字符',
            'pre_date.require'     => '预约日期不能为空',
            'pre_date.date'        => '预约日期格式不正确',
            'pre_time.require'     => '预约时间不能为空',
            'pre_time.date'        => '预约时间格式不正确',
            'images.require'       => '图片不能为空'
        ]
   ],
    'goods' => [
        'rule' => [
            'id'                   => 'require|number',
        ],
        'msg' => [
            'id.require'           => 'id不能为空',
            'id.number'            => 'id必须是数字',
        ]
    ],
    'gift_pages' => [
        'rule' => [
            'page'                   => 'require|number',
        ],
        'msg' => [
            'page.require'           => '页码不能为空',
            'page.number'            => '页码必须是数字',
        ]
    ],
    'pages' => [
        'rule' => [
            'id'                   => 'require|number',
            'page'                 => 'require|number',
        ],
        'msg' => [
            'id.require'           => 'id不能为空',
            'id.number'            => 'id必须是数字',
            'page.require'         => '页码不能为空',
            'page.number'          => '页码必须是数字',
        ]
    ],
    'keys' => [
        'rule' => [
            'id'                   => 'require|number',
            'keywords'             => 'require|max:20',
            'page'                 => 'require|number',
        ],
        'msg' => [
            'id.require'           => 'id不能为空',
            'id.number'            => 'id必须是数字',
            'keywords.require'     => '关键字不能为空',
            'keywords.max'         => '关键字最多不超过20个字符',
            'page.require'         => '页码不能为空',
            'page.number'          => '页码必须是数字',
        ]
    ],
    'comment' => [
        'rule' => [
            'id'                   => 'require|number',
            'order_id'             => 'require|number',
            'content'              => 'require|max:200'
        ],
        'msg' => [
            'id.require'           => '商品id不能为空',
            'id.number'            => '商品id必须是数字',
            'order_id.require'     => '订单id不能为空',
            'order_id.number'      => '订单id必须是数字',
            'content.require'      => '评论内容不能为空',
            'content.max'          => '评论内容最多不超过200个字符',
        ]
    ],
    'p_settle' => [
        'rule' => [
            'p_id'                => 'require',
            'p_num'               => 'require'
        ],
        'msg' => [
            'p_id.require'        => '商品id不能为空',
            'p_num.require'       => '商品数量不能为空',
        ]
    ],
    'p_orders' => [
        'rule' => [
            'p_id'                => 'require',
            'p_num'               => 'require',
            'order_sn'            => 'require',
            'address'             => 'require'
        ],
        'msg' => [
            'p_id.require'        => '商品id不能为空',
            'p_num.require'       => '商品数量不能为空',
            'order_sn.require'    => '订单编号不能为空',
            'address.require'     => '收货地址不能为空'
        ]
    ],
    'g_settle' => [
        'rule' => [
            'g_id'                => 'require',
            'g_num'               => 'require'
        ],
        'msg' => [
            'g_id.require'        => '礼品id不能为空',
            'g_num.require'       => '礼品数量不能为空',
        ]
    ],
    'g_orders' => [
        'rule' => [
            'g_id'                => 'require',
            'g_num'               => 'require',
            'order_sn'            => 'require',
            'address'             => 'require'
        ],
        'msg' => [
            'g_id.require'        => '礼品id不能为空',
            'g_num.require'       => '礼品数量不能为空',
            'order_sn.require'    => '订单编号不能为空',
            'address.require'     => '收货地址不能为空'
        ]
    ],
    'order_list' => [
        'rule' => [
            'status'               => 'require|number',
            'page'                 => 'require|number',
        ],
        'msg' => [
            'status.require'       => '状态不能为空',
            'status.number'        => '状态必须是数字',
            'page.require'         => '页码不能为空',
            'page.number'          => '页码必须是数字',
        ]
    ],
);