admin
2021-11-27 4f015b8c624484e0c3b2d88b944163ce43a48d1f
app/src/main/java/com/yeshi/location/app/entity/location/LocationUsers.java
@@ -1,7 +1,9 @@
package com.yeshi.location.app.entity.location;
import com.google.gson.annotations.Expose;
import com.yeshi.location.app.vo.user.SimpleUserInfo;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import org.yeshi.utils.generater.annotation.admin.AdminController;
@@ -23,6 +25,25 @@
public class LocationUsers implements Serializable {
    //定位邀请状态
    public enum LocationUserType {
        father("父亲"),
        mother("母亲"),
        husband("丈夫"),
        wife("妻子"),
        daughter("女儿"),
        son("儿子"),
        other("其他人");
        private String name;
        private LocationUserType(String name) {
            this.name = name;
        }
        public String getName() {
            return name;
        }
    }
    public enum LocationInviteStatus {
        sentInvite("等待对方应答"),
        agree("对方已同意"),
@@ -38,6 +59,7 @@
            return desc;
        }
    }
    @Expose
    @Show(title = "ID")
@@ -60,10 +82,16 @@
    private String targetName;
    @Expose
    private String targetPhone;
    @Expose
    @Show(title = "状态")
    @DaoQueryCondition
    @Indexed
    private LocationInviteStatus status;
    @Expose
    private LocationUserType userType;
    @Show(title = "发送的次数")
    private Integer sentCount;
@@ -88,6 +116,11 @@
    @Show(title = "更新时间")
    private Date updateTime;
    @Transient
    @Expose
    private SimpleUserInfo userInfo;
    public static String createId(Long uid, Long targetUid) {
@@ -181,4 +214,28 @@
    public void setRejectTime(Date rejectTime) {
        this.rejectTime = rejectTime;
    }
    public LocationUserType getUserType() {
        return userType;
    }
    public void setUserType(LocationUserType userType) {
        this.userType = userType;
    }
    public String getTargetPhone() {
        return targetPhone;
    }
    public void setTargetPhone(String targetPhone) {
        this.targetPhone = targetPhone;
    }
    public SimpleUserInfo getUserInfo() {
        return userInfo;
    }
    public void setUserInfo(SimpleUserInfo userInfo) {
        this.userInfo = userInfo;
    }
}