Skip to content
Snippets Groups Projects
Commit 363bd33d authored by Leonard Haddad's avatar Leonard Haddad :rocket:
Browse files

Merge branch 'model' into 'master'

added missing crew list

See merge request reswp-2020/galaxytrucker!22
parents 6ef0a55c f8a183b7
No related branches found
No related tags found
No related merge requests found
......@@ -5,12 +5,14 @@ import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;
import lombok.*;
import java.io.Serializable;
@Getter
@Setter
@NoArgsConstructor(access = AccessLevel.PUBLIC)
@RequiredArgsConstructor(access = AccessLevel.PUBLIC)
@DatabaseTable(tableName = "crew")
public class Crew {
public class Crew implements Serializable {
/**
* ID
......
package com.galaxytrucker.galaxytruckerreloaded.Model;
import com.badlogic.gdx.scenes.scene2d.ui.List;
import com.galaxytrucker.galaxytruckerreloaded.Model.Crew.Crew;
import com.galaxytrucker.galaxytruckerreloaded.Model.Map.Planet;
import com.galaxytrucker.galaxytruckerreloaded.Model.Weapons.Weapon;
import com.j256.ormlite.field.DatabaseField;
......@@ -104,6 +105,11 @@ public class Ship implements Serializable {
@DatabaseField(columnName = "systems",foreign = true)
private List<System> systems;
/** List of crew */
@NonNull
@DatabaseField(foreign = true,columnName = "crew")
private List<Crew> crew;
/**
* Take damage
*/
......
package com.galaxytrucker.galaxytruckerreloaded.Server.Persistence;
import com.galaxytrucker.galaxytruckerreloaded.Model.Crew.Crew;
public class CrewDAO extends ObjectDAO<Crew> {
/** Add a new crew member to the database
* */
@Override
public void persist(Crew o) throws Exception {
}
@Override
public void remove(Crew o) throws Exception {
}
}
......@@ -33,6 +33,7 @@ public class ShipDAO extends ObjectDAO<Ship> {
*
* @param s - the ship to add
*/
@Override
public void persist(Ship s) throws DuplicateShipException {
}
......@@ -51,6 +52,7 @@ public class ShipDAO extends ObjectDAO<Ship> {
*
* @param s - the ship to remove
*/
@Override
public void remove(Ship s) throws ShipNotFoundException{
}
......
......@@ -32,6 +32,7 @@ public class UserDAO extends ObjectDAO<User> {
*
* @param u - the user to add
*/
@Override
public void persist(User u) throws DuplicateUserException {
}
......@@ -50,6 +51,7 @@ public class UserDAO extends ObjectDAO<User> {
*
* @param u - the user to delete
*/
@Override
public void remove(User u) throws UserNotFoundException {
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment