feat: complete reverse engineering, standard Maven structure, detailed code annotations and IoT-M platform architecture
This commit is contained in:
1 parent
e8dc09fb3c
commit
cd6a4c70e7
3045 files changed
+566733
-1
No files matched your search
@@ -0,0 +1,51 @@
|
||||
package com.midm.model.battery;
|
||||
|
||||
import com.mitac.cell.db.DbObject;
|
||||
import java.util.Date;
|
||||
import java.util.UUID;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.mongodb.core.index.CompoundIndex;
|
||||
import org.springframework.data.mongodb.core.index.Indexed;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
|
||||
@Document
|
||||
@CompoundIndex(
|
||||
def = "{batterySerial: 1, reportedAt: 1}"
|
||||
)
|
||||
public class BatteryLog {
|
||||
@Id
|
||||
private UUID uuid = UUID.randomUUID();
|
||||
@Indexed
|
||||
private String batterySerial;
|
||||
@Indexed
|
||||
private String category;
|
||||
private String log;
|
||||
@Indexed
|
||||
private Date reportedAt;
|
||||
private DbObject states;
|
||||
private Date recordedAt = new Date();
|
||||
|
||||
public UUID getUuid() {
|
||||
return this.uuid;
|
||||
}
|
||||
|
||||
public String getBatterySerial() {
|
||||
return this.batterySerial;
|
||||
}
|
||||
|
||||
public void setCategory(String category) {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public DbObject getStates() {
|
||||
if (this.states == null) {
|
||||
this.states = new DbObject();
|
||||
}
|
||||
|
||||
return this.states;
|
||||
}
|
||||
|
||||
public Date getReportedAt() {
|
||||
return this.reportedAt;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user