1234567891011121314151617181920212223242526 |
- <?php
- declare (strict_types = 1);
- namespace app\txx\model;
- use think\Model;
- /**
- * @mixin \think\Model
- */
- class YzActivityPromoCode extends Model
- {
- protected $connection = 'mysql_yz';//切换连接参数
- protected $table = 'yz_activity_promocode';
- protected $pk = 'id';
- protected $autoWriteTimestamp = false;
- protected $createTime="createTime";
- protected $updateTime="updateTime";
- public static $statusCn=['待创建','有效','失效','微信审核中','创建失败'];
- public static $codeTypeCn=["UNIQUE"=>"一卡一码","GENERAL"=>"通用码"];
- public static $rangeTypeCn=["ALL"=>"全部","PART"=>"部分指定商品可用","EXCLUDED"=>"部分指定商品不可用"];
- public function Good()
- {
- return $this->belongsTo(YzGood::class,'skuCode','item_no')->bind(["good_name"=>"title"]);
- }
- }
|