Skip to content

Commit

Permalink
Make resource and domains obligatory in route
Browse files Browse the repository at this point in the history
  • Loading branch information
mj52951 committed Dec 19, 2024
1 parent b62f264 commit ceb1c46
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ type Fee @entity {
type Route @entity @index(fields: ["fromDomainID", "toDomainID", "resourceID"], unique: true) {
id: ID!
fromDomainID: String
fromDomain: Domain
fromDomain: Domain!

toDomainID: String
toDomain: Domain
toDomain: Domain!

resourceID: String
resource: Resource
resource: Resource!
transfers: [Transfer!] @derivedFrom(field: "route")
}
6 changes: 3 additions & 3 deletions src/model/generated/route.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ export class Route {

@Index_()
@ManyToOne_(() => Domain, {nullable: true})
fromDomain!: Domain | undefined | null
fromDomain!: Domain

@StringColumn_({nullable: true})
toDomainID!: string | undefined | null

@Index_()
@ManyToOne_(() => Domain, {nullable: true})
toDomain!: Domain | undefined | null
toDomain!: Domain

@StringColumn_({nullable: true})
resourceID!: string | undefined | null

@Index_()
@ManyToOne_(() => Resource, {nullable: true})
resource!: Resource | undefined | null
resource!: Resource

@OneToMany_(() => Transfer, e => e.route)
transfers!: Transfer[]
Expand Down

0 comments on commit ceb1c46

Please sign in to comment.