k.e.book.ddh.entity.CcProductFollowDO Maven / Gradle / Ivy
package k.e.book.ddh.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.beans.BeanUtils;
import java.io.Serializable;
import java.util.Date;
/**
* @author kk
* @date 2023-05-21 11:01
*/
@EqualsAndHashCode(callSuper = false)
@Data
@TableName("cc_product_follow")
@ApiModel(value="CcProductFollowDO", description="CcProductFollow")
public class CcProductFollowDO extends Model {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 用户ID
*/
@TableField("user_id")
private Integer userId;
/**
* 藏品ID
*/
@TableField("product_id")
private Integer productId;
/**
* 是否关注 0 否,1 是
*/
@TableField("is_follow")
private Integer isFollow;
/**
* 创建时间
*/
@TableField("createtime")
private Integer createtime;
/**
* 更新时间
*/
@TableField("updatetime")
private Integer updatetime;
/**
* 删除时间
*/
@TableField("deletetime")
private Integer deletetime;
/**
* createdAt
*/
@TableField("created_at")
private Date createdAt;
/**
* updatedAt
*/
@TableField("updated_at")
private Date updatedAt;
/**
* deletedAt
*/
@TableField("deleted_at")
private Date deletedAt;
public static CcProductFollowVO toVO(CcProductFollowDO ccProductFollowDO) {
if(ccProductFollowDO == null){
return null;
}
CcProductFollowVO ccProductFollowVO = new CcProductFollowVO();
BeanUtils.copyProperties(ccProductFollowDO, ccProductFollowVO);
return ccProductFollowVO;
}
public static CcProductFollowDO toDO(CcProductFollowAddDTO ccProductFollowAddDTO) {
if (ccProductFollowAddDTO == null) {
return null;
}
CcProductFollowDO ccProductFollowDO = new CcProductFollowDO();
BeanUtils.copyProperties(ccProductFollowAddDTO, ccProductFollowDO);
return ccProductFollowDO;
}
}