123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- <?php
- $status = array
- (
- 1 => '已结算',
- 2 => '未结算',
- );
- return array
- (
- # 表名
- 'name' => 'config_profit',
- # 显示给用户看的名称
- 'lang' => '钱包收益设置',
- 'menu' => false,
- 'check' => 'key',
- # 数据结构
- 'struct' => array
- (
-
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- 'search' => 'order',
- 'list' => true,
- ),
- 'config_id' => array
- (
- 'type' => 'int-11',
- 'name' => '账户id',
- 'default' => '',
- 'desc' => '账户id',
- 'match' => 'is_numeric',
- 'update' => 'hidden',
- 'value' => Dever::input('set_config_id'),
- ),
- 'name' => array
- (
- 'type' => 'varchar-150',
- 'name' => '收益名称',
- 'default' => '',
- 'desc' => '收益名称',
- 'match' => 'is_string',
- 'update' => 'text',
- 'list' => true,
- ),
- 'key' => array
- (
- 'type' => 'varchar-50',
- 'name' => '唯一标识',
- 'default' => '',
- 'desc' => '唯一标识',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => 'fulltext',
- 'list' => true,
- ),
- 'account/config_profit_rule'=> array
- (
- 'name' => '收益规则设置-“层级”为0是当前数值入库时的用户,输入1就是入库用户的直推上级,符合“条件”才能拿到收益[如{a}>1 && {a}<=100],根据“公式”可以计算出具体收益[如{a}*0.1]',
- 'default' => '',
- 'desc' => '收益规则设置',
- 'match' => 'option',
- 'sync' => array('profit_id' => 'id'),
- 'update' => array(1),
- 'update_type' => 2,
- ),
- '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_name' => '交易时间',
- 'list' => 'date("Y-m-d H:i", {cdate})',
- ),
- ),
- 'manage' => array
- (
- 'desc' => '<blockquote class="layui-elem-quote">条件变量定义:<br />
- {a}:当前数值,如订单金额<br />
- {b}:用户ID,适合对某一特殊用户做收益操作<br />
- {c}:用户角色ID<br />
- {d}:为用户角色下的等级数值<br />
- {e}:为当前层级用户的下一层子用户被分走的收益,如当前订单应分10元,我的下级分走了5元,我应该拿到5元,直接用{a}-{e}即可<br />
- 后续新增更多,公式里仅支持{a}变量
- </blockquote>',
- 'link' => 'parent=config.config_profit',
- //'insert' => false,
- //'edit' => false,
- # 自定义快捷新增和编辑
- /*
- 'button' => array
- (
- '新增' => array('fast'),
- ),
- 'list_button' => array
- (
- 'edit' => array('编辑'),
- )*/
- ),
- 'request' => array
- (
-
- ),
- );
|