All Downloads are FREE. Search and download functionalities are using the official Maven repository.

k.e.book.ddh.entity.CcUserGuildDO 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.util.Date;
/**
 * @author kk
 * @date 2023-05-21 11:01
 */
@EqualsAndHashCode(callSuper = false)
@Data
@TableName("cc_user_guild")
@ApiModel(value="CcUserGuildDO", description="CcUserGuild")
public class CcUserGuildDO 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("name")
    private String name;
    /**
     * 封面图
     */
    @TableField("image")
    private String image;
    /**
     * 内容
     */
    @TableField("content")
    private String content;
    /**
     * 邀请码
     */
    @TableField("templates/code")
    private String code;
    /**
     * 公会人数
     */
    @TableField("count")
    private Integer count;
    /**
     * createdAt
     */
    @TableField("created_at")
    private Date createdAt;
    /**
     * updatedAt
     */
    @TableField("updated_at")
    private Date updatedAt;
    /**
     * deletedAt
     */
    @TableField("deleted_at")
    private Date deletedAt;

    public static CcUserGuildVO toVO(CcUserGuildDO ccUserGuildDO) {
        if(ccUserGuildDO == null){
            return null;
        }
        CcUserGuildVO ccUserGuildVO = new CcUserGuildVO();
        BeanUtils.copyProperties(ccUserGuildDO, ccUserGuildVO);
        return ccUserGuildVO;
    }

    public static CcUserGuildDO toDO(CcUserGuildAddDTO ccUserGuildAddDTO) {
        if (ccUserGuildAddDTO == null) {
            return null;
        }
        CcUserGuildDO ccUserGuildDO = new CcUserGuildDO();
        BeanUtils.copyProperties(ccUserGuildAddDTO, ccUserGuildDO);
        return ccUserGuildDO;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy