'个人', 2 => '个体户', 3 => '企业', ); return array ( # 表名 'name' => 'service_product', # 显示给用户看的名称 'lang' => '产品管理', # 是否显示在后台菜单 'order' => -10, 'menu' => false, 'check' => 'key', # 数据结构 'struct' => array ( 'id' => array ( 'type' => 'int-11', 'name' => 'ID', 'default' => '', 'desc' => '', 'match' => 'is_numeric', 'list' => true, 'order' => 'desc', ), 'service_id' => array ( 'type' => 'int-11', 'name' => '业务id', 'default' => '1', 'desc' => '业务id', 'match' => 'is_numeric', 'update' => 'hidden', 'value' => Dever::input('search_option_service_id'), ), 'name' => array ( 'type' => 'varchar-150', 'name' => '产品名称', 'default' => '', 'desc' => '产品名称', 'match' => 'is_string', 'update' => 'text', 'search' => 'fulltext', 'list' => true, ), 'key' => array ( 'type' => 'varchar-150', 'name' => '产品标识', 'default' => '', 'desc' => '产品标识', 'match' => 'is_string', 'update' => 'text', 'search' => 'fulltext', 'list' => true, ), 'value' => array ( 'type' => 'varchar-150', 'name' => '产品值', 'default' => '', 'desc' => '产品值', 'match' => 'is_string', 'update' => 'text', 'search' => 'fulltext', 'list' => true, ), 'middleware-service_product_col'=> array ( 'name' => '字段设置', 'default' => '', 'desc' => '字段设置', 'match' => 'option', # 同步更新另外一个表的内容,两个表相关联的id,更新另一个表的字段 'sync' => array('id', 'product_id'), 'update' => array(1), ), 'reorder' => array ( 'type' => 'int-11', 'name' => '排序(数值越大越靠前)', 'default' => '1', 'desc' => '请输入排序', 'match' => 'option', //'update' => 'text', 'search' => 'order', 'list_name' => '排序', '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, //'search' => 'date', 'list' => 'date("Y-m-d H:i:s", {cdate})', ), ), 'manage' => array ( //'insert' => false, //'edit' => false, # 自定义快捷新增和编辑 'button' => array ( //'新增' => array('fast'), ), 'list_button' => array ( //'edit' => array('编辑'), //'list' => array('字段列表', 'service_product_col&oper_table=service_product&top_table=service&search_option_product_id={id}'), ) ), 'request' => array ( ) );