<?php


namespace app\lumaapi\model;


use think\Db;
use think\Model;

class MemberFavoriteModel extends Model
{

    public static function insertData($uid,$aid,$type=1){
        $favorite=self::where(['uid'=>$uid,'aid'=>$aid,'type'=>$type])->find();
        if(!$favorite){
            $where['uid']=$uid;
            $where['aid']=$aid;
            $where['type']=2;
            $where['time']=time();
            return Db::name('member_favorite')->insert($where);
        }
        return;
    }
}