| 1 | export const PROJECT_SCHEMA_VERSION = 1; |
| 2 | |
| 3 | export function createProject({ name, targetName = '', notes = '' }) { |
| 4 | const now = new Date().toISOString(); |
| 5 | return { |
| 6 | schemaVersion: PROJECT_SCHEMA_VERSION, |
| 7 | id: crypto.randomUUID(), |
| 8 | name: name.trim() || 'Untitled Project', |
| 9 | createdAt: now, |
| 10 | updatedAt: now, |
| 11 | target: { |
| 12 | name: targetName.trim(), |
| 13 | notes: notes.trim(), |
| 14 | }, |
| 15 | identifiers: [], |
| 16 | connections: [], |
| 17 | locations: [], |
| 18 | pinLinks: [], |
| 19 | mapDisplay: { |
| 20 | showPinConnections: false, |
| 21 | pinConnectionColor: '#ef4444', |
| 22 | }, |
| 23 | }; |
| 24 | } |