k.e.book.ddh.entity.CcUserCreditsLogDO 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_credits_log")
@ApiModel(value="CcUserCreditsLogDO", description="CcUserCreditsLog")
public class CcUserCreditsLogDO extends Model {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 会员ID
*/
@TableField("user_id")
private Integer userId;
/**
* 类型,0=其他,1=消费,2=签到,3=邀请好友
*/
@TableField("type")
private Integer type;
/**
* 变更经验值
*/
@TableField("credits")
private Long credits;
/**
* 变更前经验值
*/
@TableField("before")
private Long before;
/**
* 变更后经验值
*/
@TableField("after")
private Long after;
/**
* 备注
*/
@TableField("memo")
private String memo;
/**
* 创建时间
*/
@TableField("createtime")
private Integer createtime;
public static CcUserCreditsLogVO toVO(CcUserCreditsLogDO ccUserCreditsLogDO) {
if(ccUserCreditsLogDO == null){
return null;
}
CcUserCreditsLogVO ccUserCreditsLogVO = new CcUserCreditsLogVO();
BeanUtils.copyProperties(ccUserCreditsLogDO, ccUserCreditsLogVO);
return ccUserCreditsLogVO;
}
public static CcUserCreditsLogDO toDO(CcUserCreditsLogAddDTO ccUserCreditsLogAddDTO) {
if (ccUserCreditsLogAddDTO == null) {
return null;
}
CcUserCreditsLogDO ccUserCreditsLogDO = new CcUserCreditsLogDO();
BeanUtils.copyProperties(ccUserCreditsLogAddDTO, ccUserCreditsLogDO);
return ccUserCreditsLogDO;
}
}