Permalink
Browse files

Add Lance model

  • Loading branch information...
markerikson committed Jan 1, 2018
1 parent 2a6592b commit 5485b10599c3655d6d521af6b0022d87a448dcc1
Showing with 19 additions and 1 deletion.
  1. +2 −1 src/app/schema/schema.js
  2. +17 −0 src/features/unitInfo/Lance.js
View
@@ -4,9 +4,10 @@ import Pilot from "features/pilots/Pilot";
import MechDesign from "features/mechs/MechDesign";
import Mech from "features/mechs/Mech";
import Unit from "features/unitInfo/Unit";
import Lance from "features/unitInfo/Lance";
import Faction from "features/unitInfo/Faction";
const orm = new ORM();
orm.register(Pilot, MechDesign, Mech, Unit, Faction);
orm.register(Pilot, MechDesign, Mech, Unit, Faction, Lance);
export default orm;
@@ -0,0 +1,17 @@
import {Model, many, attr} from "redux-orm";
export default class Lance extends Model {
static modelName = "Lance";
static fields = {
id : attr(),
name : attr(),
pilots : many("Pilot")
};
static parse(lanceData) {
return this.upsert(lanceData);
}
}

0 comments on commit 5485b10

Please sign in to comment.