index.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // TODO: App Specific Models
  2. const {database} = require('@alancnet/material-framework/server')
  3. const { Location } = database
  4. // const Location = require('./location')
  5. const Workday = require('./workday')
  6. const Service = require('./service')
  7. const Retailer = require('./retailer')
  8. const StaffMember = require('./staff-member')
  9. const StaffingAgency = require('./staffing-agency')
  10. const Labor = require('./labor')
  11. const LocationWorkday = Location.hasMany(Workday)
  12. const WorkdayLocation = Workday.belongsTo(Location)
  13. const WorkdayService = Workday.hasMany(Service)
  14. const ServiceWorkday = Service.belongsTo(Workday)
  15. const RetailerService = Retailer.hasMany(Service)
  16. const ServiceRetailer = Service.belongsTo(Retailer)
  17. // const StaffingAgencyStaffMember = StaffingAgency.hasMany(StaffMember)
  18. // const StaffMemberStaffingAgency = StaffMember.belongsTo(StaffingAgency)
  19. module.exports = Object.assign(database, {
  20. Location,
  21. Workday,
  22. Service,
  23. Retailer,
  24. StaffMember,
  25. StaffingAgency,
  26. LocationWorkday,
  27. WorkdayLocation,
  28. WorkdayService,
  29. ServiceWorkday,
  30. RetailerService,
  31. ServiceRetailer,
  32. Labor
  33. })