Add support for multiple batteries per device

This commit is contained in:
vanous
2021-11-02 14:37:47 +01:00
parent b0585fc852
commit 788f4d8ae0
11 changed files with 281 additions and 63 deletions
@@ -43,7 +43,7 @@ public class GBDaoGenerator {
public static void main(String[] args) throws Exception {
Schema schema = new Schema(34, MAIN_PACKAGE + ".entities");
Schema schema = new Schema(35, MAIN_PACKAGE + ".entities");
Entity userAttributes = addUserAttributes(schema);
Entity user = addUserInfo(schema, userAttributes);
@@ -613,6 +613,7 @@ public class GBDaoGenerator {
Property deviceId = batteryLevel.addLongProperty("deviceId").primaryKey().notNull().getProperty();
batteryLevel.addToOne(device, deviceId);
batteryLevel.addIntProperty("level").notNull();
batteryLevel.addIntProperty("batteryIndex").notNull().primaryKey();;
return batteryLevel;
}