123456789101112131415161718192021222324252627 |
- <?php
- namespace app\common\model;
- use think\Model;
- /**
- * 邮箱验证码
- */
- class GoodsEval Extends Model
- {
- protected $autoWriteTimestamp=true;
- protected $updateTime=null;
- public function user(){
- return $this->belongsTo(User::class);
- }
- public static function getEval(OrderInfo $info){
- $orders=$info->orders;
- if(!$orders){
- return null;
- }
- return self::where('order_id',$orders['id'])
- ->where('goods_id',$info['goods_id'])
- ->find();
- }
- }
|