k.e.book.ddh.entity.CcUserBoxDO 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_user_box")
@ApiModel(value="CcUserBoxDO", description="CcUserBox")
public class CcUserBoxDO extends Model {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 上级id
*/
@TableField("parent_id")
private Integer parentId;
/**
* 盲盒编号
*/
@TableField("box_id")
private Integer boxId;
/**
* 用户编号
*/
@TableField("user_id")
private Integer userId;
/**
* 卖家编号
*/
@TableField("seller_id")
private Integer sellerId;
/**
* 订单id
*/
@TableField("orderid")
private String orderid;
/**
* 金额数量
*/
@TableField("amount")
private Integer amount;
/**
* 购买数量
*/
@TableField("quantity")
private Integer quantity;
/**
* 未开盒数量
*/
@TableField("unopenQty")
private Integer unopenQty;
/**
* 已开盒数量
*/
@TableField("openQty")
private Integer openQty;
/**
* 项目编号
*/
@TableField("item_ids")
private String itemIds;
/**
* 创建时间
*/
@TableField("createtime")
private Integer createtime;
/**
* 更新时间
*/
@TableField("updatetime")
private Integer updatetime;
/**
* 删除时间
*/
@TableField("deletetime")
private Integer deletetime;
/**
* 状态:0=隐藏,1=未开盒,2=已开盒,3=已开完,4=未定义,5=暂未分配,6=挂售中,7=已售出,8=锁定中
*/
@TableField("status")
private String status;
/**
* createdAt
*/
@TableField("created_at")
private Date createdAt;
/**
* updatedAt
*/
@TableField("updated_at")
private Date updatedAt;
/**
* deletedAt
*/
@TableField("deleted_at")
private Date deletedAt;
public static CcUserBoxVO toVO(CcUserBoxDO ccUserBoxDO) {
if(ccUserBoxDO == null){
return null;
}
CcUserBoxVO ccUserBoxVO = new CcUserBoxVO();
BeanUtils.copyProperties(ccUserBoxDO, ccUserBoxVO);
return ccUserBoxVO;
}
public static CcUserBoxDO toDO(CcUserBoxAddDTO ccUserBoxAddDTO) {
if (ccUserBoxAddDTO == null) {
return null;
}
CcUserBoxDO ccUserBoxDO = new CcUserBoxDO();
BeanUtils.copyProperties(ccUserBoxAddDTO, ccUserBoxDO);
return ccUserBoxDO;
}
}