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

k.e.book.ddh.entity.CcAreaDO 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_area")
@ApiModel(value="CcAreaDO", description="CcArea")
public class CcAreaDO extends Model  {
    private static final long serialVersionUID = 1L;


    @TableId(value = "id", type = IdType.AUTO)
    private Long id;


    /**
     * 父id
     */
    @TableField("pid")
    private Integer pid;
    /**
     * 简称
     */
    @TableField("shortname")
    private String shortname;
    /**
     * 名称
     */
    @TableField("name")
    private String name;
    /**
     * 全称
     */
    @TableField("mergename")
    private String mergename;
    /**
     * 层级:1=省,2=市,3=区/县
     */
    @TableField("level")
    private Integer level;
    /**
     * 拼音
     */
    @TableField("pinyin")
    private String pinyin;
    /**
     * 长途区号
     */
    @TableField("templates/code")
    private String code;
    /**
     * 邮编
     */
    @TableField("zip")
    private String zip;
    /**
     * 首字母
     */
    @TableField("first")
    private String first;
    /**
     * 经度
     */
    @TableField("lng")
    private String lng;
    /**
     * 纬度
     */
    @TableField("lat")
    private String lat;

    public static CcAreaVO toVO(CcAreaDO ccAreaDO) {
        if(ccAreaDO == null){
            return null;
        }
        CcAreaVO ccAreaVO = new CcAreaVO();
        BeanUtils.copyProperties(ccAreaDO, ccAreaVO);
        return ccAreaVO;
    }

    public static CcAreaDO toDO(CcAreaAddDTO ccAreaAddDTO) {
        if (ccAreaAddDTO == null) {
            return null;
        }
        CcAreaDO ccAreaDO = new CcAreaDO();
        BeanUtils.copyProperties(ccAreaAddDTO, ccAreaDO);
        return ccAreaDO;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy