<?php

return array (
    //用户身份
    //甲方员工
    'a_staff' => 1,
    //乙方员工
    'b_staff' => 2,
    //甲方领导
    'a_leader' => 3,
    //乙方领导
    'b_leader' => 4,
    //甲方总领导
    'a_leaders' => 5,
    //分页数据
    'limit' => 10,
    //域名
    'host' => 'http://xiaofang.w.bronet.cn',
   //甲方提交报修流程
    'a_step' => ['甲方提交报修信息','乙方确认信息','乙方维修设备','乙方提交维修单','甲方验收维修结果','甲方验收完成'],

   //乙方提交报修流程
    'b_step' => ['乙方提交报修信息','甲方确认信息','乙方维修设备','乙方提交维修单','甲方验收维修结果','甲方验收完成'],
   //验证规则
    'v_code' => [
        'rule' => [
            'mobile'               => ['require','regex'=>'/^0?1[3|4|5|6|7|8][0-9]\d{8}$/'],
            'mobile_code'          => 'require|number',
        ],
        'msg' => [
            'mobile.require'       => '手机号不能为空',
            'mobile'               => '手机号格式不正确',
            'mobile_code.require'  => '验证码不能为空',
            'mobile_code.number'   => '验证码必须是数字',
        ]
    ],
   'f_pass' => [
       'rule' => [
           'mobile'                => ['require','regex'=>'/^0?1[3|4|5|6|7|8][0-9]\d{8}$/'],
           'password'              => 'require',
           'password_again'        => 'require',
       ],
       'msg' => [
           'mobile.require'             => '手机号不能为空',
           'mobile'                     => '手机号格式不正确',
           'password.require'           => '请输入密码',
           'password_again.require'     => '请再次输入密码',
       ]
   ],
   'is_work' => [
       'rule' => [
           'is_work'              => 'require|number',
       ],
       'msg' => [
           'is_work.require'      => '工作状态不能为空',
           'is_work.number'       => '工作状态必须是数字',
       ]
   ],
    'ins_add' => [
        'rule' => [
            'id'                   => 'require|number',
        ],
        'msg' => [
            'id.require'           => 'id不能为空',
            'id.number'            => 'id必须是数字',
        ]
    ],
    'type' => [
        'rule' => [
            'type'                 => 'require|number',
            'page'                 => 'require|number',
        ],
        'msg' => [
            'type.require'           => '工作类型不能为空',
            'type.number'            => '工作类型必须是数字',
            'page.require'           => '页码不能为空',
            'page.number'            => '页码必须是数字',
        ]
    ],
    'ins_post' => [
        'rule' => [
            'point_id'                 => 'require|number',
            'project_id'               => 'require|number',
            'status'                   => 'require|number',
            'images'                   => 'require',
            'create_time'              => 'require',
        ],
        'msg' => [
            'point_id.require'       => '巡检点id不能为空',
            'point_id.number'        => '巡检点id必须是数字',
            'project_id.require'     => '项目id不能为空',
            'project_id.number'      => '项目id必须是数字',
            'status.require'         => '巡检状态不能为空',
            'status.number'          => '巡检状态必须是数字',
            'images.require'         => '巡检图片不能为空',
            'create_time.require'    => '巡检时间不能为空',
        ]
    ],
    'pages' => [
        'rule' => [
            'page'                   => 'require|number',
        ],
        'msg' => [
            'page.require'           => '页码不能为空',
            'page.number'            => '页码必须是数字',
        ]
    ],
    'pages_list' => [
        'rule' => [
            'page'                   => 'require|number',
            'status'                 => 'require|number',
        ],
        'msg' => [
            'page.require'           => '页码不能为空',
            'page.number'            => '页码必须是数字',
            'status.require'         => '状态码不能为空',
            'status.number'          => '状态码必须是数字',
        ]
    ],
    'repair_post' => [
        'rule' => [
            'images'                => 'require',
            'video'                 => 'require',
            'audio'                 => 'require',
            'description'           => 'require',
        ],
        'msg' => [
            'images.require'       => '图片凭证不能为空',
            'video.require'        => '视频凭证不能为空',
            'audio.require'        => '音频凭证不能为空',
            'description.require'  => '故障问题不能为空',
        ]
    ],
    'data' => [
        'rule' => [
            'id'                   => 'require|number',
        ],
        'msg' => [
            'id.require'           => '列表id不能为空',
            'id.number'            => '列表id必须是数字',
        ]
    ],
    'improve_post' => [
        'rule' => [
            'id'                  => 'require|number',
            'repair_images'       => 'require',
            'repair_description'  => 'require',
        ],
        'msg' => [
            'id.require'                   => '报修单id不能为空',
            'id.number'                    => '报修的id必须为数字',
            'repair_images.require'        => '维修照片不能为空',
            'repair_description.require'   => '维修备注不能为空',
        ]
    ],
    'check_post' => [
        'rule' => [
            'id'                  => 'require|number',
            'confirm_images'      => 'require',
        ],
        'msg' => [
            'id.require'                   => '报修单id不能为空',
            'id.number'                    => '报修的id必须为数字',
            'confirm_images.require'       => '验收照片不能为空',
        ]
    ],
    'ins_m_post' => [
        'rule' => [
            'ins_m_time'                 => 'require',
            'address'                    => 'require',
            'a_uid'                      => 'require|number',
            'remark'                     => 'require',
        ],
        'msg' => [
            'ins_m_time.require'       => '月检时间不能为空',
            'address.require'          => '月检地点不能为空',
            'a_uid.require'            => '月检甲方负责人不能为空',
            'a_uid.number'             => '月检甲方负责人必须是数字',
            'remark.require'           => '月检申请备注不能为空',
        ]
    ],
    'confirm' => [
        'rule' => [
            'id'                     => 'require|number',
            'type'                   => 'require|number',
        ],
        'msg' => [
            'id.require'             => '列表id不能为空',
            'id.number'              => '列表id必须是数字',
            'type.require'           => '工作类型不能为空',
            'type.number'            => '工作类型必须是数字',
        ]
    ],
    'ins_re_post' => [
        'rule' => [
            'id'                         => 'require|number',
            'ins_m_time'                 => 'require',
            'address'                    => 'require',
            'a_uid'                      => 'require|number',
            'remark'                     => 'require',
        ],
        'msg' => [
            'id.require'               => '月检id不能为空',
            'id.number'                => '月检id必须是数字',
            'ins_m_time.require'       => '月检时间不能为空',
            'address.require'          => '月检地点不能为空',
            'a_uid.require'            => '月检甲方负责人不能为空',
            'a_uid.number'             => '月检甲方负责人必须是数字',
            'remark.require'           => '月检申请备注不能为空',
        ]
    ],
    'train_post' => [
        'rule' => [
            'train_time'                 => 'require',
            'address'                    => 'require',
            'remark'                     => 'require',
        ],
        'msg' => [
            'train_time.require'       => '培训时间不能为空',
            'address.require'          => '培训地点不能为空',
            'remark.require'           => '培训备注不能为空',
        ]
    ],
    'improve_check_post' => [
        'rule' => [
            'id'                   => 'require|number',
            'images'               => 'require'
        ],
        'msg' => [
            'id.require'           => '列表id不能为空',
            'id.number'            => '列表id必须是数字',
            'images.require'       => '图片不能为空',
        ]
    ],
);