AppDingDetails.java 1.6 KB
Newer Older
Z
zhipeng.zhang 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
package com.tools.module.app.entity;


import com.tools.common.model.PageBean;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.GregorianCalendar;

@Data
@Entity
@Table(name = "app_ding_details")
public class AppDingDetails  extends PageBean implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 用户id
     */
    @Id
    private Integer userId;

    /**
     * 国家
     */
    @Column(name = "country")
    private String country;

    /**
     * 地址
     */
    @Column(name = "address")
    private String address;

    /**
     * 省
     */
    @Column(name = "province")
    private String province;

    /**
     * 城市
     */
    @Column(name = "city")
    private String city;

    /**
     * 纬度
     */
    @Column(name = "latitude")
    private String latitude;

    /**
     * 发表的信息
     */
    @Column(name = "description")
    private String description;

    /**
     * START  上班  END 下班
     */
    @Column(name = "type")
    private String type;

    /**
     * 经度
     */
    private String longitude;

    public AppDingDetails() {
        //  结果为“0”是上午 结果为“1”是下午
        GregorianCalendar ca = new GregorianCalendar();
        if (ca.get(GregorianCalendar.AM_PM) == 0 || "0".equals(ca.get(GregorianCalendar.AM_PM))) {
            this.type = "START";
        } else {
            this.type = "END";
        }
    }
}