Skip to content

Commit

Permalink
Merge 6340510 into 64daecd
Browse files Browse the repository at this point in the history
  • Loading branch information
Raditya Kertiyasa committed Sep 20, 2018
2 parents 64daecd + 6340510 commit 6b1c0e5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion model/diagnosis_and_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ type DiagnosisAndAction struct {
ID string
Diagnosis string
Action string
CreatedAt string `db:"created_at"`
UnitCost float64 `db:"unit_cost"`
CreatedAt string `db:"created_at"`
}
4 changes: 4 additions & 0 deletions resolver/diagnosis_and_action_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ func (d *diagnosisAndActionResolver) Action() *string {
return &d.d.Action
}

func (d *diagnosisAndActionResolver) UnitCost() *float64 {
return &d.d.UnitCost
}

func (d *diagnosisAndActionResolver) CreatedAt() (*graphql.Time, error) {
if d.d.CreatedAt == "" {
return nil, nil
Expand Down
1 change: 1 addition & 0 deletions schema/type/diagnosis_and_action.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ type DiagnosisAndAction {
id: ID!
diagnosis: String
action: String
unitCost: Float
createdAt: Time
}

0 comments on commit 6b1c0e5

Please sign in to comment.