k.e.book.ddh.entity.CcUserGroupDO 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_group")
@ApiModel(value="CcUserGroupDO", description="CcUserGroup")
public class CcUserGroupDO extends Model {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 组名
*/
@TableField("name")
private String name;
/**
* 权限节点
*/
@TableField("rules")
private String rules;
/**
* 类型,member=会员组,special=特殊用户组,system=系统用户组
*/
@TableField("type")
private String type;
/**
* 专属头像框
*/
@TableField("avatar")
private String avatar;
/**
* 平台服务费折扣
*/
@TableField("servicefeerebate")
private Long servicefeerebate;
/**
* 消费返现
*/
@TableField("consumerebate")
private Long consumerebate;
/**
* 签到倍率
*/
@TableField("signinrebate")
private Long signinrebate;
/**
* 此组需要的经验值上限
*/
@TableField("creditshigher")
private Integer creditshigher;
/**
* 此组需要的经验值下限
*/
@TableField("creditslower")
private Integer creditslower;
/**
* 会员权益
*/
@TableField("rightdata")
private String rightdata;
/**
* 指定拥有藏品
*/
@TableField("product_ids")
private String productIds;
/**
* 添加时间
*/
@TableField("createtime")
private Integer createtime;
/**
* 更新时间
*/
@TableField("updatetime")
private Integer updatetime;
/**
* 状态
*/
@TableField("status")
private String status;
public static CcUserGroupVO toVO(CcUserGroupDO ccUserGroupDO) {
if(ccUserGroupDO == null){
return null;
}
CcUserGroupVO ccUserGroupVO = new CcUserGroupVO();
BeanUtils.copyProperties(ccUserGroupDO, ccUserGroupVO);
return ccUserGroupVO;
}
public static CcUserGroupDO toDO(CcUserGroupAddDTO ccUserGroupAddDTO) {
if (ccUserGroupAddDTO == null) {
return null;
}
CcUserGroupDO ccUserGroupDO = new CcUserGroupDO();
BeanUtils.copyProperties(ccUserGroupAddDTO, ccUserGroupDO);
return ccUserGroupDO;
}
}