Skip to content

Instantly share code, notes, and snippets.

@jzcorrea
Last active February 15, 2018 17:17
Show Gist options
  • Save jzcorrea/2dec6ace74b9e7a1875df76928ab6864 to your computer and use it in GitHub Desktop.
Save jzcorrea/2dec6ace74b9e7a1875df76928ab6864 to your computer and use it in GitHub Desktop.
Alterações necessárias para testar o carregamento de relacionamentos ON DEMAND

ADICIONAR RELACIONAMENTOS DOS MODELS COMO LISTA:

{
	model: 'NomeDoModelRelacionado',
	type: 'belongsTo|hasOne|hasMany|belongsToMany',
	options: {
		as: 'AliasDoRelacionamento',
		foreignKey: 'ChaveDoRelacionamento',
		through: 'OpcoesDeRelacionamentoN:N'
	}
}

ONDE UTILIZAR O OBJETO model.associations, TROCAR PARA O ARRAY model.options.associations

CONTROLLERS (3):

  • dbTableController
  • itemController
  • searchController

DAOS (21):

  • BaseDAO
  • FineQualificationDAO
  • ForeseenMaintenancePlanServiceItemDAO
  • GenericDAO
  • ItemDAO
  • MaintenancePlanDAO
  • MaintenancePlanServiceDAO
  • MeasurementUnitDAO
  • QulificationSeverityDAO
  • ReportDAO2
  • SubSystemDAO
  • SystemDAO
  • TireBrandDAO
  • TireDimensionDAO
  • VehicleAxisTypeDAO
  • VehicleBrandDAO
  • VehicleLayoutDAO
  • VehicleModelDAO
  • VehicleModelRecordDAO
  • VehicleModelVersionDAO
  • VehicleTypeDAO

LIBS (14):

  • baseManagement
  • BeforeRemoveCheck (Conferir)
  • cascadeDelete
  • CustomField
  • ChileExpress (?)
  • equivalentRecordCheck
  • Item
  • logger
  • ReportChart
  • ReportQueryGenerator
  • Table2
  • SequelizeModelsMethods
  • dbUtil
  • generateClientDB

SCRIPTS (3):

  • 20170710091136-nflt_1771_update_item_associations.js
  • 20170809100858-nflt_1819_update_reports.js
  • 20170906113222-nflt_2150_update_report_charts.js

TOOLS (2):

  • updater
  • update_records_without_app_id

JOBS (1):

  • update_data

TASKS DO SCHEDULER (1):

  • create_client_database

ONDE UTILIZAR INCLUDES, TROCAR PARA O BaseDAO/GenericDAO

  • Scripts
  • dbTableController.js
  • nightTransportController.js
  • ✅ AdvancePaymentDAO.js
  • ✅ CashBasisDAO.js
  • ✅ CustomerDAO.js
  • ✅ DriverControlDAO.js
  • ✅ EmployeeDAO.js
  • ✅ ExpenseDAO.js
  • ✅ ExpenseParcelDAO.js
  • ✅ FineDAO.js
  • ✅ FineInfrigementResourceDAO.js
  • ✅ FineQualificationDAO.js
  • ✅ ForeseenServiceOrderDAO.js
  • ✅ GateAppointmentDAO.js
  • ✅ ItemDAO.js
  • ✅ MeasurementUnitDAO.js
  • ✅ NotificationDAO.js
  • ✅ PendencyDAO.js
  • ✅ QualificationSeverityDAO.js
  • ✅ RequestOccurrenceDAO.js
  • ✅ ServiceOrderDAO.js
  • ✅ StockEntryDAO.js
  • ✅ StockEntryItemDAO.js
  • ✅ StockTransferDAO.js
  • ✅ StockTransferItemDAO.js
  • ✅ SubsidiaryDAO.js
  • ✅ SubSystemDAO.js
  • ✅ SupplierDAO.js
  • ✅ SystemDAO.js
  • ✅ TireBrandDAO.js
  • ✅ TireDAO.js
  • ✅ TireDimensionDAO.js
  • ✅ TransactionDAO.js
  • ✅ VehicleBrandDAO.js
  • ✅ VehicleDAO.js
  • ✅ VehicleDueDAO.js
  • ✅ VehicleHitchDAO.js
  • ✅ VehicleLayoutAxeDAO.js
  • ✅ VehicleLayoutPositionDAO.js
  • ✅ VehicleMaintenancePlanServiceDAO.js
  • ✅ VehicleModelDAO.js
  • ✅ VehicleModelRecordDAO.js
  • ✅ VehicleModelVersionDAO.js
  • ✅ VehicleTypeDAO.js
  • benchmarking.js
  • ✅ Expense.js
  • ✅ Item.js
  • ✅ FineInfringementResource.js
  • ✅ maintenancePlan.js
  • ✅ ManagerVehicleLayout.js
  • ✅ RequestOccurrence.js
  • ✅ Request.js
  • ✅ Entry.js
  • ✅ Exit.js
  • ✅ Validation.js
  • ✅ VisualManagement.js
  • ✅ Workflow.js
  • ✅ insert_vehicle_maintenance_plan_service.js
  • check_basic_maintenance.js
  • check_vehicle_maintenance_plans.js
  • generate_utilized_quota.js
  • generate_vehicle_stock.js
  • PendencyManager.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment