k.e.book.ddh.entity.CcGiveDO 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_give")
@ApiModel(value="CcGiveDO", description="CcGive")
public class CcGiveDO extends Model {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 发送人
*/
@TableField("user_id")
private Integer userId;
/**
* 接收人
*/
@TableField("receive_uid")
private Long receiveUid;
/**
* 产品ID
*/
@TableField("product_id")
private Integer productId;
/**
* 项目ID
*/
@TableField("item_id")
private Integer itemId;
/**
* 持仓ID
*/
@TableField("collect_id")
private String collectId;
/**
* 创建时间
*/
@TableField("createtime")
private Integer createtime;
/**
* 更新时间
*/
@TableField("updatetime")
private Integer updatetime;
/**
* 删除时间
*/
@TableField("deletetime")
private Integer deletetime;
/**
* 状态:0=已取消,1=进行中,2=已转赠
*/
@TableField("status")
private Integer status;
/**
* createdAt
*/
@TableField("created_at")
private Date createdAt;
/**
* updatedAt
*/
@TableField("updated_at")
private Date updatedAt;
/**
* deletedAt
*/
@TableField("deleted_at")
private Date deletedAt;
public static CcGiveVO toVO(CcGiveDO ccGiveDO) {
if(ccGiveDO == null){
return null;
}
CcGiveVO ccGiveVO = new CcGiveVO();
BeanUtils.copyProperties(ccGiveDO, ccGiveVO);
return ccGiveVO;
}
public static CcGiveDO toDO(CcGiveAddDTO ccGiveAddDTO) {
if (ccGiveAddDTO == null) {
return null;
}
CcGiveDO ccGiveDO = new CcGiveDO();
BeanUtils.copyProperties(ccGiveAddDTO, ccGiveDO);
return ccGiveDO;
}
}