1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- /**
- * initial data for the demo module
- **/
- /**
- * primary contains the primary data for the module.
- * It could come from a database, file or any other asynchronous source.
- * It can have joins from other databases directly in a field (e.g. joins)
- **/
- export const primary = [{
- id: 'primary-1',
- name: 'String1',
- active: true,
- items: [
- { id: 'item1-1' },
- { id: 'item1-2' }
- ],
- joins: [{
- id: 'id2',
- primaryId: 'primary-1',
- name: 'secondary1-2'
- }]
- }, {
- id: 'primary-2',
- name: 'String2',
- active: false,
- items: [
- { id: 'item2-1' },
- { id: 'item2-2' },
- { id: 'item2-3' },
- { id: 'item2-4' }
- ],
- joins: [{
- id: 'id1',
- primaryId: 'primary-2',
- name: 'secondary1-1'
- }, {
- id: 'id3',
- primaryId: 'primary-2',
- name: 'secondary1-3'
- }]
- }]
- /**
- * secondary contains the secondary data for the module.
- * It could come from a database, file or any other asynchronous source.
- * It is collected from the source and placed as reference in the primary data.
- * It should have a reference to the primary item it belongs to.
- **/
- export const secondary2 = [{
- id: 'id1',
- primaryId: 'primary-1',
- name: 'secondary2-1'
- }, {
- id: 'id2',
- primaryId: 'primary-2',
- name: 'secondary2-2'
- }, {
- id: 'id3',
- primaryId: 'primary-1',
- name: 'secondary2-3'
- }]
|