package api.pojo;
public class Enum {
public enum Authority {
USER, EXPERTS, ORGANIZATION, ADMIN
}
public enum Status {
Enabled, Disabled, Yes, No, Y, N
}
public enum Examine {
New, Pending, Rejected, Approved
}
public enum Task {
New, Processing, Canceled, Completed
}
public enum Sex {
True, False, T, F, Male, Female, Boy, Girl
}
public Enum() {
// TODO Auto-generated constructor stub
}
}
package api.domain;
import java.util.Date;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
@Document
public class Logging {
public enum Priority {
info, warning, error, critical, exception, debug
}
public enum Facility {
app, sms, ios, android, api, db
}
@Id
private String id;
private String tag;
private Date time;
private Facility facility;
private Priority priority;
private String message;
public Logging() {
// TODO Auto-generated constructor stub
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTag() {
return tag;
}
public void setTag(String tag) {
this.tag = tag;
}
public Date getTime() {
return time;
}
public void setTime(Date time) {
this.time = time;
}
public Facility getFacility() {
return facility;
}
public void setFacility(Facility facility) {
this.facility = facility;
}
public Priority getPriority() {
return priority;
}
public void setPriority(Priority priority) {
this.priority = priority;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
@Override
public String toString() {
return "Logging [id=" + id + ", tag=" + tag + ", time=" + time + ", facility=" + facility + ", priority=" + priority + ", message=" + message + "]";
}
}
package cn.netkiller.api.domain;
import org.springframework.data.geo.Point;
import org.springframework.data.redis.core.index.GeoIndexed;
import org.springframework.data.redis.core.index.Indexed;
public class Address {
private @Indexed String city;
private String country;
private @GeoIndexed Point location;
public Address(String city, String country, Point location) {
this.city = city;
this.country = country;
this.location = location;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public Point getLocation() {
return location;
}
public void setLocation(Point location) {
this.location = location;
}
}