s3.rb 578 B

123456789101112131415161718192021222324252627282930
  1. # frozen_string_literal: true
  2. require 'neo4j'
  3. # Information on Bucket
  4. class Bucket
  5. include Neo4j::ActiveNode
  6. property :name, constraint: :unique
  7. property :versioning
  8. property :creation
  9. property :size
  10. has_one :out, :region, rel_class: :BucketRegion
  11. has_one :out, :owner, rel_class: :BucketAccount
  12. end
  13. # Map Bucket to Region
  14. class BucketRegion
  15. include Neo4j::ActiveRel
  16. from_class :Bucket
  17. to_class :Region
  18. type :region
  19. end
  20. # Map Bucket to Region
  21. class BucketAccount
  22. include Neo4j::ActiveRel
  23. from_class :Bucket
  24. to_class :AwsAccount
  25. type :owner
  26. end