problems with my project's structure
hi,
I want to create an object for the following situation:

The object can include one or more stations. Every station can include one or more types. Every type can include one or more diagrams.
This elements also should be objects. When I create the "master" object I want to define the following structure (example):
3 stations with the nams "Station1", "Station2" and "Station3"
- Station1 should include 2 types -> "Typ1" and "Typ2"
- Typ1 should include 3 diagramms
- Typ2 should include 1 diagramm
- Station2 should include 1 type -> "Typ1"
...
- Station3 should include 3 type -> "Typ1", "Typ2" and "Typ3"
...
Is this the correct approach:
- jQuery.fn.mytest1 = function() {
- var Typ = function(){
- typ : "Strom",
- diagramme: [],
- };
- var Diagramm = function(){};
- Diagramm.prototype = {
- zählertyp: "Strom",
- diagrammtyp: "Trend"
- };
- var Station = function(){};
- Station.prototype = {
- name: "StationA",
- typen: [],
-
- };
When I create such a project, the structure always be the same. Only the number of stations, types and diagrams and the options are different.
I have already learned a lot of javascript an jquery but I do not find a hint for such a structure.
Can anyone give me a hint?
Thanks a lot!