Skip to content
jmrowe edited this page Jan 22, 2012 · 9 revisions

Part

Variables

identifierFieldName = "partId"

Part(val partId: Identifier, val partName: String, val vehicles: Option[Vehicle] = None, val modId: Option[String] = None)

  • partId: Identifier - Mandatory id required for DB storage
  • partName: String - Mandatory short name for the part
  • vehicles: Option[Vehicle] - Optional list of vehicles this part can be fitted to
  • modId: Option[String] - Optional MoD part id which can be a mixture of characters

Methods

  • Add part
  • Edit part
  • Find a part with the option to specify which vehicle this is for

Assumptions

General

  • The parts list will be populated by the database users as parts are ordered and supplied to the end customer. There is no definitive parts list. All parts go through an identify process e.g. they are located in the PDF relevant to each vehicle (there are multiple vehicles supported) and this contains the part name, and an ID number (the ID is not always clear). In time this should build up a definitive parts list applicable to each vehicle but this data will not be prepopulated as part of this work.
  • Part costs are owned by the relevant supplier, as a part may have multiple suppliers with different costs.
  • Stock Control information for parts is outside the scope of this project.

partName

  • This is a short text description of the part for the order form and searching, this name does not need to be unique but if it is this will help in searches.
  • This code does not cover aliases. Users entering new parts must understand different customers may call the same part using different names, so there must be discipline in choosing the part name, e.g. do not tie the name to a vehicle unless it is specific to a vehicle.

vehicles

  • A part may be fitted to multiple vehicles.

modId

  • A part may or may not have a MoD id.
  • This id can be a mixture of characters.
  • This code does not cover the possibility for multiple MoD part numbers on different vehicles
Clone this wiki locally