| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430 | <?php$type = array(	1 => '否',	2 => '是',);$range_type = array(	1 => '全部商品可用',	2 => '指定商品可用',);return array(	# 表名	'name' => 'card',	# 显示给用户看的名称	'lang' => '优惠券管理',	'order' => 100,	'check' => 'key',	# 数据结构	'struct' => array	(		'id' 		=> array		(			'type' 		=> 'int-11',			'name' 		=> 'ID',			'default' 	=> '',			'desc' 		=> '',			'match' 	=> 'is_numeric',			'search'	=> 'order',			'list'		=> true,		),		'project_id'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '项目ID',			'default' 	=> '',			'desc' 		=> '请输入项目',			'match' 	=> 'is_numeric',			'list'		=> true,		),		'hr1'		=> array		(			'name' 		=> '基本信息',			'class'		=> '',//本项必须填写			'attr'		=> '',		),		'key'		=> array		(			'type' 		=> 'varchar-20',			'name' 		=> '优惠券key-通过key值搜索数据,key请不要重复',			'default' 	=> '',			'desc' 		=> '优惠券key-通过key值搜索数据',			'match' 	=> 'is_string',			'update'	=> 'text',			'list'		=> true,			'edit'		=> true,		),				'name'		=> array		(			'type' 		=> 'varchar-120',			'name' 		=> '名称',			'default' 	=> '',			'desc' 		=> '名称',			'match' 	=> 'is_string',			'update'	=> 'text',			'list'		=> true,		),		'description'		=> array		(			'type' 		=> 'varchar-120',			'name' 		=> '使用说明',			'default' 	=> '',			'desc' 		=> '使用说明',			'match' 	=> 'is_string',			'update'	=> 'textarea',			//'list'		=> true,		),		'create_num'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '生成数量',			'default' 	=> '',			'desc' 		=> '生成数量',			'match' 	=> 'is_numeric',			'update'	=> 'text',			'list'		=> true,			'edit'		=> true,		),		'edate'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '优惠券结束时间',			'match' 	=> 'option',			'desc' 		=> '优惠券结束时间',			'update'	=> 'date',			//'list'		=> 'date("Y-m-d H:i:s", {sdate})',			'callback'	=> 'maketime',		),		'sdate'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '优惠券生效时间',			'match' 	=> 'option',			'desc' 		=> '优惠券生效时间',			'update'	=> 'date',			//'list'		=> 'date("Y-m-d H:i:s", {sdate})',			'callback'	=> 'maketime',		),		'fixed_term'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '几天内有效-当日领取之后几天内有效',			'default' 	=> '',			'desc' 		=> '几天内有效',			'match' 	=> 'option',			'update'	=> 'text',		),		'fixed_begin_term'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '延迟开始的时间',			'default' 	=> '',			'desc' 		=> '延迟开始的时间',			'match' 	=> 'option',			//'update'	=> 'text',		),		'hr2'		=> array		(			'name' 		=> '基本设置',			'class'		=> '',//本项必须填写			'attr'		=> '',		),		'quota'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '每人限领个数',			'default' 	=> '-1',			'desc' 		=> '每人限领个数',			'match' 	=> 'option',			'update'	=> 'text',		),		'total'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '总库存',			'default' 	=> '1',			'desc' 		=> '总库存',			'match' 	=> 'option',			'update'	=> 'text',		),		'value'		=> array		(			'type' 		=> 'varchar-30',			'name' 		=> '优惠券面值-如果填写了以下随机面额,则本字段为随机面额最小值',			'default' 	=> '0.01',			'desc' 		=> '优惠券面值',			'match' 	=> 'option',			'update'	=> 'text',		),		'value_random_to'		=> array		(			'type' 		=> 'varchar-20',			'name' 		=> '优惠券随机面额-随机面额最大值',			'default' 	=> '',			'desc' 		=> '优惠券随机面额',			'match' 	=> 'option',			'update'	=> 'text',		),		'specify_item_ids'		=> array		(			'type' 		=> 'varchar-600',			'name' 		=> '可选商品ID-需要指定可用商品ID,多个用半角逗号分隔,如不指定则为全部商品可用',			'default' 	=> '',			'desc' 		=> '可选商品ID',			'match' 	=> 'option',			'update'	=> 'text',			//'list'		=> true,		),		'at_least'		=> array		(			'type' 		=> 'varchar-20',			'name' 		=> '优惠券使用价格-订单满这个价格,优惠券才可以使用',			'default' 	=> '',			'desc' 		=> '订单满这个价格,优惠券才可以使用',			'match' 	=> 'option',			'update'	=> 'text',			//'list'		=> true,		),		'discount'		=> array		(			'type' 		=> 'varchar-20',			'name' 		=> '优惠券使用折扣-如填写88,就是8.8折',			'default' 	=> '',			'desc' 		=> '优惠券使用折扣',			'match' 	=> 'option',			'update'	=> 'text',			//'list'		=> true,		),				'expire_notice'		=> array		(			'type' 		=> 'tinyint-1',			'name' 		=> '是否发送提醒-是否到期前4天发送提醒',			'default' 	=> '1',			'desc' 		=> '是否发送提醒',			'match' 	=> 'option',			'update'	=> 'select',			'option'	=> $type,		),		'is_forbid_preference'		=> array		(			'type' 		=> 'tinyint-1',			'name' 		=> '是否仅原价购买商品时可用',			'default' 	=> '1',			'desc' 		=> '是否仅原价购买商品时可用',			'match' 	=> 'option',			'update'	=> 'select',			'option'	=> $type,		),		'is_share'		=> array		(			'type' 		=> 'tinyint-1',			'name' 		=> '是否可分享领取链接',			'default' 	=> '1',			'desc' 		=> '是否可分享领取链接',			'match' 	=> 'option',			'update'	=> 'select',			'option'	=> $type,		),		'mark_tag_ids'		=> array		(			'type' 		=> 'varchar-600',			'name' 		=> '标签设置-领取优惠券要给用户打上的标签的ID,多个用半角逗号分隔',			'default' 	=> '',			'desc' 		=> '标签设置',			'match' 	=> 'option',			'update'	=> 'text',			//'list'		=> true,		),		'need_user_level'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '是否限制领用者的等级-小于0表示不限制,大于0 表示领用者必须是这个等级ID',			'default' 	=> '-1',			'desc' 		=> '是否限制领用者的等级',			'match' 	=> 'option',			'update'	=> 'text',		),		'hr3'		=> array		(			'name' 		=> '微信设置',			'class'		=> '',//本项必须填写			'attr'		=> '',		),		'is_sync_weixin'		=> array		(			'type' 		=> 'tinyint-1',			'name' 		=> '是否同步微信卡券',			'default' 	=> '1',			'desc' 		=> '是否同步微信卡券',			'match' 	=> 'option',			'update'	=> 'select',			'option'	=> $type,		),		'weixin_title'		=> array		(			'type' 		=> 'varchar-30',			'name' 		=> '卡券标题',			'default' 	=> '',			'desc' 		=> '卡券标题',			'match' 	=> 'option',			'update'	=> 'text',			//'list'		=> true,		),		'weixin_sub_title'		=> array		(			'type' 		=> 'varchar-30',			'name' 		=> '卡券副标题',			'default' 	=> '',			'desc' 		=> '卡券副标题',			'match' 	=> 'option',			'update'	=> 'text',			//'list'		=> true,		),		'weixin_color_rgb'		=> array		(			'type' 		=> 'varchar-20',			'name' 		=> '卡券颜色的值-例如:#55bd47',			'default' 	=> '',			'desc' 		=> '卡券颜色的值',			'match' 	=> 'option',			'update'	=> 'text',			//'list'		=> true,		),		'service_phone'		=> array		(			'type' 		=> 'varchar-20',			'name' 		=> '卡券的客服电话',			'default' 	=> '',			'desc' 		=> '卡券的客服电话',			'match' 	=> 'option',			'update'	=> 'text',			//'list'		=> true,		),		'hr4'		=> array		(			'name' 		=> '微信模板消息设置',			'class'		=> '',//本项必须填写			'attr'		=> '',		),		'msg_key'		=> array		(			'type' 		=> 'varchar-20',			'name' 		=> '模板消息key',			'default' 	=> '',			'desc' 		=> '模板消息key',			'match' 	=> 'is_string',			'update'	=> 'text',			//'list'		=> true,			//'edit'		=> true,		),		'msg_page'		=> array		(			'type' 		=> 'varchar-200',			'name' 		=> '页面路径',			'default' 	=> 'pages/index/index',			'desc' 		=> '页面路径',			'match' 	=> 'is_string',			'update'	=> 'text',			//'list'		=> true,		),		'msg_content'		=> array		(			'type' 		=> 'text-255',			'name' 		=> '模板内容',			'default' 	=> '',			'desc' 		=> '请输入内容',			'match' 	=> 'is_string',			'update'	=> array			(				array				(					'col'		=> 'key',					'name' 		=> '标识',					'default' 	=> '',					'desc' 		=> '请输入标识',					'match' 	=> 'is_string',					'update'	=> 'text',				),				array				(					'col' 		=> 'value',					'name' 		=> '内容值',					'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' 		=> '',			'default' 	=> '',			'list'		=> 'date("Y-m-d H:i:s", {cdate})',		),	),	'top' => Dever::config('base', 'youzan')->top,	'manage' => array	(		//'delete' => false,		//'insert' => false,		//'edit' => false,		'list_button' => array		(			'oper' => array('立刻生成', '"youzan/card.create?id={id}"'),		),	),);
 |