package cn.reghao.tnb.content.app.geo.model.po;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.math.BigDecimal;

/**
 * @author reghao
 * @date 2025-03-17 17:14:22
 */
@NoArgsConstructor
@AllArgsConstructor
@Getter
@Setter
public class GeoChina {
    private Integer id;
    private Integer pid;
    private Integer deep;
    private String name;
    private String extPath;
    private BigDecimal longitude;
    private BigDecimal latitude;
    private String polygon;
    private transient String multiPolygon;

    public GeoChina(int id, int pid, int deep, String name, String extPath, double lng, double lat) {
        this.id = id;
        this.pid = pid;
        this.deep = deep;
        this.name = name;
        this.extPath = extPath;
        this.longitude = BigDecimal.valueOf(lng);
        this.latitude = BigDecimal.valueOf(lat);
    }
}
