| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- // TODO: App Specific Models
- const {database} = require('@alancnet/material-framework/server')
- const { Location, Retailer } = database
- // const Location = require('./location')
- const Workday = require('./workday')
- const Service = require('./service')
- //const Retailer = require('./retailer')
- const StaffMember = require('./staff-member')
- const StaffingAgency = require('./staffing-agency')
- const Labor = require('./labor')
- const LocationWorkday = Location.hasMany(Workday)
- const WorkdayLocation = Workday.belongsTo(Location)
- const WorkdayService = Workday.hasMany(Service)
- const ServiceWorkday = Service.belongsTo(Workday)
- const RetailerService = Retailer.hasMany(Service)
- const ServiceRetailer = Service.belongsTo(Retailer)
- const LocationStaffMember = Location.hasMany(StaffMember)
- const StaffMemberLocation = StaffMember.belongsTo(Location)
- const LocationRetailer = Location.hasMany(Retailer)
- const RetailerLocation = Retailer.belongsTo(Location)
- // const StaffingAgencyStaffMember = StaffingAgency.hasMany(StaffMember)
- // const StaffMemberStaffingAgency = StaffMember.belongsTo(StaffingAgency)
- module.exports = Object.assign(database, {
- Location,
- Workday,
- Service,
- Retailer,
- StaffMember,
- StaffingAgency,
- LocationWorkday,
- WorkdayLocation,
- WorkdayService,
- ServiceWorkday,
- RetailerService,
- ServiceRetailer,
- LocationStaffMember,
- StaffMemberLocation,
- Labor,
- LocationRetailer,
- RetailerLocation
- })
|