sqs.rb 637 B

1234567891011121314151617181920212223242526272829303132
  1. # frozen_string_literal: true
  2. require 'neo4j'
  3. # Information on SQSQueue
  4. class SQSQueue
  5. include Neo4j::ActiveNode
  6. property :url, constraint: :unique
  7. property :name
  8. property :modified
  9. property :creation
  10. property :retention
  11. property :maxsize
  12. has_one :out, :region, rel_class: :SQSQueueRegion
  13. has_one :out, :owner, rel_class: :SQSQueueAccount
  14. end
  15. # Map SQSQueue to Region
  16. class SQSQueueRegion
  17. include Neo4j::ActiveRel
  18. from_class :SQSQueue
  19. to_class :Region
  20. type :region
  21. end
  22. # Map SQSQueue to Region
  23. class SQSQueueAccount
  24. include Neo4j::ActiveRel
  25. from_class :SQSQueue
  26. to_class :AwsAccount
  27. type :owner
  28. end