k.e.book.ddh.entity.CcOrderAddressDO 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_order_address")
@ApiModel(value="CcOrderAddressDO", description="CcOrderAddress")
public class CcOrderAddressDO extends Model {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 订单ID
*/
@TableField("order_id")
private Integer orderId;
/**
* 订单类型: 1=积分商城,2=抽奖订单
*/
@TableField("order_type")
private Integer orderType;
/**
* 用户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("exchange_data")
private String exchangeData;
/**
* 物流公司ID
*/
@TableField("express_company_id")
private Integer expressCompanyId;
/**
* 快递编号
*/
@TableField("express_no")
private String expressNo;
/**
* 创建时间
*/
@TableField("createtime")
private Integer createtime;
/**
* 更新时间
*/
@TableField("updatetime")
private Integer updatetime;
/**
* 删除时间
*/
@TableField("deletetime")
private Integer deletetime;
public static CcOrderAddressVO toVO(CcOrderAddressDO ccOrderAddressDO) {
if(ccOrderAddressDO == null){
return null;
}
CcOrderAddressVO ccOrderAddressVO = new CcOrderAddressVO();
BeanUtils.copyProperties(ccOrderAddressDO, ccOrderAddressVO);
return ccOrderAddressVO;
}
public static CcOrderAddressDO toDO(CcOrderAddressAddDTO ccOrderAddressAddDTO) {
if (ccOrderAddressAddDTO == null) {
return null;
}
CcOrderAddressDO ccOrderAddressDO = new CcOrderAddressDO();
BeanUtils.copyProperties(ccOrderAddressAddDTO, ccOrderAddressDO);
return ccOrderAddressDO;
}
}