123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171 |
- <?php
- return array
- (
- # 表名
- 'name' => 'profit',
- # 显示给用户看的名称
- 'lang' => '用户收益列表',
- 'order' => 100,
- 'menu' => false,
- # 数据结构
- 'struct' => array
- (
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- //'list' => true,
- ),
- 'uid' => array
- (
- 'type' => 'int-11',
- 'name' => '用户信息',
- 'default' => '0',
- 'desc' => '用户信息',
- 'match' => 'is_numeric',
- 'list' => 'Dever::load("account/lib/project.getUsername", {uid}, {config_id})',
- ),
- 'config_id' => array
- (
- 'type' => 'int-11',
- 'name' => '账户名称',
- 'default' => '1',
- 'desc' => '账户名称',
- 'match' => 'is_numeric',
- 'list' => 'account/config-one#name',
- 'value' => Dever::input('set_config_id'),
- ),
- 'project_id' => array
- (
- 'type' => 'int-11',
- 'name' => '所属项目',
- 'default' => '1',
- 'desc' => '所属项目',
- 'match' => 'is_numeric',
- 'list' => 'account/config_project-one#name',
- ),
- 'config_profit_id' => array
- (
- 'type' => 'int-11',
- 'name' => '所属收益',
- 'default' => '1',
- 'desc' => '所属收益',
- 'match' => 'is_numeric',
- 'list' => 'account/config_profit-one#name',
- ),
- 'cash' => array
- (
- 'type' => 'decimal-11,2',
- 'name' => '总金额',
- 'default' => '0',
- 'desc' => '总金额',
- 'match' => 'option',
- 'update' => 'text',
- 'list_name' => '未结算',
- 'list' => '{cash}-{ycash}',
- ),
- 'ycash' => array
- (
- 'type' => 'decimal-11,2',
- 'name' => '已结算',
- 'default' => '0',
- 'desc' => '已结算',
- 'match' => 'option',
- 'update' => 'text',
- 'list' => 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,
- ),
- ),
- # 索引
- 'index' => array
- (
- 1 => array
- (
- 'search' => 'uid,config_id,project_id,config_profit_id',
- ),
-
- # 版本号 更改版本号会更新当前表的索引
- 'version' => 1,
- ),
- 'manage' => array
- (
- 'delete' => false,
- 'edit' => false,
- 'insert' => false,
- ),
- # request 请求接口定义
- 'request' => array
- (
- # 更新
- 'incCash' => array
- (
- 'type' => 'update',
- 'where' => array
- (
- 'id' => 'yes',
- ),
- 'set' => array
- (
- 'cash' => array('yes', '+='),
- ),
- ),
- # 更新
- 'incYcash' => array
- (
- 'type' => 'update',
- 'where' => array
- (
- 'id' => 'yes',
- ),
- 'set' => array
- (
- 'ycash' => array('yes', '+='),
- ),
- ),
- # 更新
- 'incTcash' => array
- (
- 'type' => 'update',
- 'where' => array
- (
- 'id' => 'yes',
- ),
- 'set' => array
- (
- 'tcash' => array('yes', '+='),
- ),
- ),
- )
- );
|