package com.benyun.core.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@TableName("ddt_wd_info")
public class WdInfo {
    @TableField("wd_id")
    private String wdId;
    @TableField("wd_img")
    private String wdImg;
    @TableField("wd_name")
    private String wdName;
    @TableField("create_date")
    @JsonSerialize(using = LocalDateSerializer.class)
    @JsonDeserialize(using = LocalDateDeserializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate createDate;
    @TableField("addr_info")
    private String addrInfo;
    @TableField("addr_code")
    private String addrCode;
    @TableField("lat")
    private BigDecimal lat;
    @TableField("lng")
    private BigDecimal lng;
    @TableField("type_code_tx")
    private String typeCodeTx;
    @TableField("type_name_tx")
    private String typeNameTx;
    @TableField("type_code_gd")
    private String typeCodeGd;
    @TableField("type_name_gd")
    private String typeNameGd;
    @TableField("type_code_by")
    private String typeCodeBy;
    @TableField("type_name_by")
    private String typeNameBy;
    @TableField("rent")
    private Double rent;
    @TableField("audit")
    private int audit;
    @TableField("wd_type_code")
    private String wdTypeCode;
    @TableField("enter_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime enterTime;
    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime updateTime;
    @TableField("collect_user_id")
    private String collectUserId;
    @TableField("collect_person")
    private String collectPerson;
    @TableField("collect_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime collectTime;
    @TableField("hash")
    private String hash;
    @TableField("geo_hash")
    private String geoHash;
}
