package com.wgb.system.service.domain.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;


@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("sys_map")
@KeySequence("SEQ_SYS_MAP_ID")
public class SysMap {
    @TableId(value = "id", type = IdType.INPUT)
       private Long id;
       private String citycode;     //城市编号
       private String adcode;       //编号
       private String name;         //名称
       private String parentCode;   //父标签IDD
       private String center;       //坐标
       private String level;        //省市区 标识        省-province  city-市   县城-district，  乡镇street
       private String cityLevel;
       @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
       @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
       private String createTime;

   public SysMap(String citycode, String adcode, String name, String parentCode, String center, String level) {
      this.citycode = citycode;
      this.adcode = adcode;
      this.name = name;
      this.parentCode = parentCode;
      this.center = center;
      this.level = level;
   }
}
