123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- <?php
- $role = function()
- {
- $info = Dever::db('setting/role')->select();
- return $info;
- };
- $type = array
- (
- 1 => '代理商合同',
- 2 => '代理升级变更合同',
- 3 => '软件服务合同',
- );
- return array
- (
- # 表名
- 'name' => 'agreement',
- # 显示给用户看的名称
- 'lang' => '合同模板',
- 'order' => 3,
- # 数据结构
- 'struct' => array
- (
-
- 'id' => array
- (
- 'type' => 'int-11',
- 'name' => 'ID',
- 'default' => '',
- 'desc' => '',
- 'match' => 'is_numeric',
- 'search' => 'order',
- 'update' => 'hidden',
- //'list' => true,
- ),
- 'type' => array
- (
- 'type' => 'tinyint-1',
- 'name' => '合同类型',
- 'default' => '1',
- 'desc' => '合同类型',
- 'match' => 'is_numeric',
- 'update' => 'radio',
- 'option' => $type,
- 'search' => 'select',
- 'list' => true,
- 'control' => 'type',
- ),
- 'role_id' => array
- (
- 'type' => 'int-11',
- 'name' => '代理商角色',
- 'default' => '',
- 'desc' => '代理商角色',
- 'match' => 'is_numeric',
- 'update' => 'hidden',
- 'search' => 'hidden',
- 'list' => 'Dever::load("setting/role-one#name", {role_id})',
- 'show' => 'type=1',
- ),
- 'name' => array
- (
- 'type' => 'varchar-500',
- 'name' => '合同名称-变量说明:{name}是用户姓名,{role}代理商名称,{area}城市地区',
- 'default' => '',
- 'desc' => '合同名称',
- 'match' => 'is_string',
- 'update' => 'text',
- 'search' => 'fulltext',
- 'list' => true,
- ),
- 'content' => array
- (
- 'type' => 'text-255',
- 'name' => '合同内容-变量说明:{name}是用户姓名,{role}代理商名称,{area}城市地区',
- 'default' => '',
- 'desc' => '合同内容',
- 'match' => 'is_string',
- 'update' => 'textarea',
- ),
- '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
- (
-
- ),
- 'request' => array
- (
-
- ),
- );
|