admin
2021-12-04 c79b1ebed5a42a4cbb2f824232da2a51ff22a9a1
app/src/main/java/com/yeshi/location/app/entity/location/LocationUsers.java
@@ -1,6 +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;
@@ -22,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 +60,8 @@
        }
    }
    @Expose
    @Show(title = "ID")
    @Id
    private String id;
@@ -47,18 +71,27 @@
    @Indexed
    private Long uid;
    @Expose
    @Show(title = "目标用户ID")
    @DaoQueryCondition
    @Indexed
    private Long targetUid;
    @Expose
    @Show(title = "目标用户名称")
    private String targetName;
    @Expose
    private String targetPhone;
    @Expose
    @Show(title = "状态")
    @DaoQueryCondition
    @Indexed
    private LocationInviteStatus status;
    @Expose
    private LocationUserType userType;
    @Show(title = "发送的次数")
    private Integer sentCount;
@@ -71,6 +104,11 @@
    @Indexed
    private Date accessTime;
    @Show(title = "拒绝时间")
    @DaoQueryCondition
    @Indexed
    private Date rejectTime;
    @Show(title = "创建时间")
    @DaoQueryCondition
    @Indexed
@@ -78,6 +116,11 @@
    @Show(title = "更新时间")
    private Date updateTime;
    @Transient
    @Expose
    private SimpleUserInfo userInfo;
    public static String createId(Long uid, Long targetUid) {
@@ -163,4 +206,36 @@
    public void setSentCount(Integer sentCount) {
        this.sentCount = sentCount;
    }
    public Date getRejectTime() {
        return rejectTime;
    }
    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;
    }
}