package com.wzj.soopin.content.domain.bo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.wzj.soopin.content.domain.po.MyLikedVlog;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.common.core.domain.BaseBO;
import org.dromara.common.core.domain.model.BaseAudit;

@TableName("cont_my_liked_vlog")
@Data
@EqualsAndHashCode(callSuper = true)
public class MyLikedVlogBO extends BaseBO<MyLikedVlog> {
	@TableId
	private String id;

	/**
	 * 用户id
	 */
	private String userId;

	/**
	 * 喜欢的短视频id
	 */
	@TableField("vlog_id")
	private String vlogId;


    @Override
    public LambdaQueryWrapper<MyLikedVlog> toWrapper() {
        return super.toWrapper().eq(userId!=null,MyLikedVlog::getUserId,userId)
            .eq(vlogId!=null,MyLikedVlog::getVlogId,vlogId);
    }
}
