k.e.book.ddh.entity.CcUserAddressDO 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;
/**
* @author kk
* @date 2023-05-21 11:01
*/
@EqualsAndHashCode(callSuper = false)
@Data
@TableName("cc_user_address")
@ApiModel(value="CcUserAddressDO", description="CcUserAddress")
public class CcUserAddressDO 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("templates/code")
private String code;
/**
* 收件人地址
*/
@TableField("address")
private String address;
/**
* 收件人姓名
*/
@TableField("name")
private String name;
/**
* 收件人手机号码
*/
@TableField("mobile")
private String mobile;
/**
* 备注
*/
@TableField("remark")
private String remark;
/**
* 创建时间
*/
@TableField("createtime")
private Integer createtime;
/**
* 更新时间
*/
@TableField("updatetime")
private Integer updatetime;
/**
* 删除时间
*/
@TableField("deletetime")
private Integer deletetime;
/**
* 是否默认:0=否,1=是
*/
@TableField("is_default")
private Integer isDefault;
public static CcUserAddressVO toVO(CcUserAddressDO ccUserAddressDO) {
if(ccUserAddressDO == null){
return null;
}
CcUserAddressVO ccUserAddressVO = new CcUserAddressVO();
BeanUtils.copyProperties(ccUserAddressDO, ccUserAddressVO);
return ccUserAddressVO;
}
public static CcUserAddressDO toDO(CcUserAddressAddDTO ccUserAddressAddDTO) {
if (ccUserAddressAddDTO == null) {
return null;
}
CcUserAddressDO ccUserAddressDO = new CcUserAddressDO();
BeanUtils.copyProperties(ccUserAddressAddDTO, ccUserAddressDO);
return ccUserAddressDO;
}
}