Skip to content

Commit

Permalink
update state model to include tool reference
Browse files Browse the repository at this point in the history
  • Loading branch information
jaeddy committed Aug 23, 2019
1 parent f600c81 commit a654e48
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion server/api/resource/models/state.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import Resource from './resource.model';
var StateSchema = new mongoose.Schema({
data: {
type: String,
required: true
},
tool: {
type: mongoose.Schema.Types.ObjectId,
ref: 'Tool'
}
});

Expand Down
5 changes: 4 additions & 1 deletion shared/interfaces/entities/resources/state.model.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { Resource } from './resource.model';
import { Tool } from '../tool.model';


export interface State extends Resource {
data: string;
data?: string;
tool: Tool;
}

0 comments on commit a654e48

Please sign in to comment.