Act.php 651 B

12345678910111213141516171819202122
  1. <?php
  2. declare (strict_types = 1);
  3. namespace app\txx\model;
  4. use think\Model;
  5. /**
  6. * @mixin \think\Model
  7. */
  8. class Act extends Model
  9. {
  10. protected $createTime='addtime';
  11. protected $updateTime="updatetime";
  12. public static $statusCn=['待选择商品','待同步创建优惠券码','待同步优惠券码','待确认上传至活动主办方','已确认上传至活动主办方','券码创建失败','券码同步失败'];
  13. public function goodInfo(){
  14. return $this->hasMany(ActGood::class,'actCode','actCode')
  15. ->where(['is_del'=>0])
  16. ->with(['platformYz'=>["good"=>['unit','brand','category'],"platform"]]);
  17. }
  18. }