k.e.book.ddh.entity.CcIntegralCouponDO 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_integral_coupon")
@ApiModel(value="CcIntegralCouponDO", description="CcIntegralCoupon")
public class CcIntegralCouponDO extends Model {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 用户id
*/
@TableField("user_id")
private Integer userId;
/**
* 用户名
*/
@TableField("username")
private String username;
/**
* 抵扣券名称
*/
@TableField("title")
private String title;
/**
* 来源:0=未知,1=空投
*/
@TableField("source")
private Integer source;
/**
* 类型
*/
@TableField("type")
private Integer type;
/**
* 面值
*/
@TableField("volume")
private Integer volume;
/**
* 状态:-1=已过期,0=未使用,1=已使用
*/
@TableField("status")
private Integer status;
/**
* 生效时间
*/
@TableField("validity_start")
private Integer validityStart;
/**
* 过期时间
*/
@TableField("validity_end")
private Integer validityEnd;
/**
* 备注
*/
@TableField("remark")
private String remark;
/**
* 创建时间
*/
@TableField("createtime")
private Integer createtime;
/**
* 更新时间
*/
@TableField("updatetime")
private Integer updatetime;
/**
* 删除时间
*/
@TableField("deletetime")
private Integer deletetime;
public static CcIntegralCouponVO toVO(CcIntegralCouponDO ccIntegralCouponDO) {
if(ccIntegralCouponDO == null){
return null;
}
CcIntegralCouponVO ccIntegralCouponVO = new CcIntegralCouponVO();
BeanUtils.copyProperties(ccIntegralCouponDO, ccIntegralCouponVO);
return ccIntegralCouponVO;
}
public static CcIntegralCouponDO toDO(CcIntegralCouponAddDTO ccIntegralCouponAddDTO) {
if (ccIntegralCouponAddDTO == null) {
return null;
}
CcIntegralCouponDO ccIntegralCouponDO = new CcIntegralCouponDO();
BeanUtils.copyProperties(ccIntegralCouponAddDTO, ccIntegralCouponDO);
return ccIntegralCouponDO;
}
}