1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <?php
- # 定义几个常用的选项
- $option = array
- (
- 1 => '显示',
- 2 => '不显示',
- );
- $type = array
- (
- 1 => '不发送push',
- 2 => '发送push',
- );
- return array
- (
- # 表名
- 'name' => 'type',
- # 显示给用户看的名称
- 'lang' => '消息类型',
- 'order' => 20,
- 'menu' => false,
- # 数据结构
- 'struct' => array
- (
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- 'search' => 'fulltext',
- 'order' => 'desc',
- 'list' => true,
- ),
- 'name' => array
- (
- 'type' => 'varchar-30',
- 'name' => '类型名称-类型id值为10以下则为系统消息',
- 'default' => '',
- 'desc' => '请填写类型名称',
- 'match' => 'is_string',
- 'update' => 'text',
- //'list' => true,
- ),
- 'type' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '是否同时发送push',
- 'default' => '1',
- 'desc' => '请选择是否同时发送push',
- 'match' => 'is_numeric',
- 'option' => $type,
- 'update' => 'radio',
- //'search' => 'select',
- //'list' => true,
- ),
- 'state' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '状态',
- 'default' => '1',
- 'desc' => '请选择状态',
- 'match' => 'is_numeric',
- 'option' => $option,
- 'update' => 'radio',
- 'search' => 'select',
- 'list' => true,
- ),
- 'cdate' => array
- (
- 'type' => 'int-11',
- 'name' => '录入时间',
- 'match' => array('is_numeric', time()),
- 'desc' => '',
- # 只有insert时才生效
- 'insert' => true,
- //'list' => 'date("Y-m-d H:i:s", {cdate})',
- ),
- ),
-
- 'manage' => array
- (
-
- ),
-
- # request 请求接口定义
- 'request' => array
- (
-
- ),
- );
|