123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260 |
- <?php
- $status = array
- (
- 1 => array('name' => '待审核', 'style' => 'font-weight:bold;color:#436EEE'),
- 2 => array('name' => '入选审核通过', 'style' => 'font-weight:bold;color:#003366'),
- 3 => array('name' => '未通过入选', 'style' => 'font-weight:bold;color:#993333'),
- );
- $audit = array
- (
- //1 => '待审核',
- 2 => '审核通过',
- 3 => '审核未通过',
- );
- $sex = array
- (
- 1 => '男',
- 2 => '女',
- );
- return array
- (
- # 表名
- 'name' => 'baoming',
- # 显示给用户看的名称
- 'lang' => '报名列表',
- 'order' => 100,
- 'set' => array
- (
- 'status' => $status,
- 'audit' => $audit,
- ),
- # 数据结构
- 'struct' => array
- (
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- 'list' => true,
- ),
- 'act_id' => array
- (
- 'type' => 'int-11',
- 'name' => '活动id',
- 'default' => 'act_id',
- 'desc' => '活动id',
- 'match' => 'is_numeric',
- ),
- 'parent_name' => array
- (
- 'type' => 'varchar-300',
- 'name' => '家长姓名',
- 'default' => '',
- 'desc' => '家长姓名',
- 'match' => 'is_string',
- 'update' => 'text',
- 'list' => true,
- 'search' => 'fulltext',
- ),
- 'mobile' => array
- (
- 'type' => 'bigint-11',
- 'name' => '联系电话',
- 'default' => '',
- 'desc' => '联系电话',
- 'match' => 'is_numeric',
- 'update' => 'text',
- 'list' => true,
- 'search' => 'fulltext',
- ),
- 'area' => array
- (
- 'type' => 'varchar-500',
- 'name' => '所在城市',
- 'default' => '',
- 'desc' => '所在城市',
- 'match' => 'is_string',
- 'search' => 'linkage',
- 'update' => 'linkage',
- 'option' => Dever::url('api.get?level_total=2', 'area'),
- 'list' => 'Dever::load("area/api.string", "{area}")',
- ),
- 'name' => array
- (
- 'type' => 'varchar-300',
- 'name' => '宝贝姓名',
- 'default' => '',
- 'desc' => '宝贝姓名',
- 'match' => 'is_string',
- 'update' => 'text',
- 'list' => true,
- 'search' => 'fulltext',
- ),
- 'age' => array
- (
- 'type' => 'int-11',
- 'name' => '宝贝年龄',
- 'default' => '',
- 'desc' => '宝贝年龄',
- 'match' => 'option',
- 'update' => 'text',
- ),
- 'sex' => array
- (
- 'type' => 'int-11',
- 'name' => '宝贝性别',
- 'default' => '',
- 'desc' => '宝贝性别',
- 'match' => 'option',
- 'update' => 'radio',
- 'option' => $sex,
- ),
- 'height' => array
- (
- 'type' => 'int-11',
- 'name' => '宝贝身高',
- 'default' => '',
- 'desc' => '宝贝身高',
- 'match' => 'option',
- 'update' => 'text',
- ),
- 'weight' => array
- (
- 'type' => 'int-11',
- 'name' => '宝贝体重',
- 'default' => '',
- 'desc' => '宝贝体重',
- 'match' => 'option',
- 'update' => 'text',
- ),
- 'size' => array
- (
- 'type' => 'int-11',
- 'name' => '宝贝衣服尺码',
- 'default' => '',
- 'desc' => '宝贝衣服尺码',
- 'match' => 'option',
- 'update' => 'text',
- ),
- 'audit' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '审核状态',
- 'default' => '2',
- 'desc' => '审核状态',
- 'match' => 'is_numeric',
- 'option' => $audit,
- 'update' => $col ? 'radio' : false,
- ),
- 'audit_desc' => array
- (
- 'type' => 'varchar-500',
- 'name' => '审核备注',
- 'default' => '',
- 'desc' => '审核备注',
- 'match' => 'option',
- 'update' => $col ? 'textarea' : false,
- ),
- 'audit_admin' => array
- (
- 'type' => 'int-11',
- 'name' => '审核人',
- 'default' => '',
- 'match' => 'is_numeric',
- 'desc' => '审核人',
- //'list' => '"{audit_admin}" > 0 ? Dever::load("manage/admin-find#username", {audit_admin}) : "-"',
- ),
- 'status' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '状态',
- 'default' => '1',
- 'desc' => '状态',
- 'match' => 'is_numeric',
- 'option' => $status,
- 'search' => 'select',
- 'list' => true,
- //'search_after' => '<br />',
- //'mul' => true,
- //'mul_option' => array(2 => '批量审核'),
- ),
- 'reorder' => array
- (
- 'type' => 'int-11',
- 'name' => '排序-数值越大越靠前,相当于置顶',
- 'default' => '1',
- 'desc' => '请输入排序',
- 'match' => 'option',
- //'update' => 'text',
- 'search' => 'order',
- 'list' => true,
- 'order' => 'desc',
- 'edit' => true,
- ),
-
- 'state' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '状态',
- 'default' => '1',
- 'desc' => '请选择状态',
- 'match' => 'is_numeric',
- ),
- 'cdate' => array
- (
- 'type' => 'int-11',
- 'name' => '录入时间',
- 'match' => array('is_numeric', time()),
- 'desc' => '',
- # 只有insert时才生效
- 'insert' => true,
- ),
- ),
-
- # 管理功能
- 'manage' => array
- (
- //'insert' => false,
- # 列表
- 'list_button' => array
- (
- //'edit' => array('预览', str_replace('https://api.', 'http://www.', Dever::url('main/preview.get?type=1'))),
- ),
- ),
- # request 请求接口定义
- 'request' => array
- (
- 'list_button' => array
- (
- 'list' => array('查看详情', '"up&page_type=1&baoming_id={id}"'),
- 'fast' => array('审核', '"baoming&where_id={id}&col=audit,audit_desc"', '{status} == 1'),
- 'fast1' => array('反审核', '"baoming&where_id={id}&col=audit,audit_desc"', '{status} == 3'),
- ),
- ),
- );
|