package com.rehome.mqttclienttemperature.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.Proxy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

@EntityListeners(AuditingEntityListener.class)
@Proxy(lazy = false)
@Data
@Entity
public class WebServiceCity implements Serializable {

    @Id
    @ApiModelProperty(value = "城市编号")
    @Column(length=30)
    private String code;

    @ApiModelProperty(value = "国内外城市中文名称")
    @Column(length=100)
    private String cityName;

    @ApiModelProperty(value = "国内外城市英文名称")
    @Column(length=100)
    private String cityNameEn;

    @ApiModelProperty(value = "日期")
    @Temporal(TemporalType.TIMESTAMP)
    @CreatedDate
    private Date createDate;

    @ApiModelProperty(value = "时")
    @Column(length=20)
    private String dataHour;

    @ApiModelProperty(value = "分")
    @Column(length=20)
    private String dataMinute;

    @ApiModelProperty(value = "秒")
    @Column(length=20)
    private String dataSecond;
}
