index.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // TODO: App Specific Models
  2. const {database} = require('@alancnet/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 StaffMember = require('./staff-member')
  8. const StaffingAgency = require('./staffing-agency')
  9. const LocationWorkday = Location.hasMany(Workday)
  10. const WorkdayLocation = Workday.belongsTo(Location)
  11. const WorkdayService = Workday.hasMany(Service)
  12. const ServiceWorkday = Service.belongsTo(Workday)
  13. const RetailerService = Retailer.hasMany(Service)
  14. const ServiceRetailer = Service.belongsTo(Retailer)
  15. // const StaffingAgencyStaffMember = StaffingAgency.hasMany(StaffMember)
  16. // const StaffMemberStaffingAgency = StaffMember.belongsTo(StaffingAgency)
  17. module.exports = Object.assign(database, {
  18. Location,
  19. Workday,
  20. Service,
  21. Retailer,
  22. StaffMember,
  23. StaffingAgency,
  24. LocationWorkday,
  25. WorkdayLocation,
  26. WorkdayService,
  27. ServiceWorkday,
  28. RetailerService,
  29. ServiceRetailer,
  30. })