index.js 747 B

1234567891011121314151617181920212223242526272829
  1. // TODO: App Specific Models
  2. const {database} = require('material-framework/server')
  3. const Location = require('./location')
  4. const Workday = require('./workday')
  5. const Service = require('./service')
  6. const Retailer = require('./retailer')
  7. const LocationWorkday = Location.hasMany(Workday)
  8. const WorkdayLocation = Workday.belongsTo(Location)
  9. const WorkdayService = Workday.hasMany(Service)
  10. const ServiceWorkday = Service.belongsTo(Workday)
  11. const RetailerService = Retailer.hasMany(Service)
  12. const ServiceRetailer = Service.belongsTo(Retailer)
  13. module.exports = Object.assign(database, {
  14. Location,
  15. Workday,
  16. Service,
  17. Retailer,
  18. LocationWorkday,
  19. WorkdayLocation,
  20. WorkdayService,
  21. ServiceWorkday,
  22. RetailerService,
  23. ServiceRetailer,
  24. })