-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
P0Production blocker - must fix immediatelyProduction blocker - must fix immediatelycore-dataCore Data framework relatedCore Data framework relatedenhancementNew feature or requestNew feature or requestsub-taskPart of a larger epicPart of a larger epic
Description
📋 Sub-task of Epic #86
Problem
No Core Data models (.xcdatamodeld) exist in the project. Need to create proper entity definitions.
Required Entities
Item Entity
- id: UUID
- name: String
- brand: String?
- model: String?
- category: String (enum raw value)
- condition: String (enum raw value)
- quantity: Int32
- value: Decimal (as NSDecimalNumber)
- purchasePrice: Decimal?
- purchaseDate: Date?
- notes: String?
- barcode: String?
- serialNumber: String?
- tags: Transformable (array of strings)
- imageIds: Transformable (array of UUIDs)
- locationId: UUID?
- warrantyId: UUID?
- createdAt: Date
- updatedAt: Date
Location Entity
- id: UUID
- name: String
- type: String (enum raw value)
- parentId: UUID?
- customFields: Transformable (dictionary)
- createdAt: Date
- updatedAt: Date
Photo Entity
- id: UUID
- itemId: UUID
- imageData: Binary
- thumbnailData: Binary
- metadata: Transformable
- uploadedAt: Date
Receipt Entity
- id: UUID
- storeName: String
- purchaseDate: Date
- totalAmount: Decimal
- taxAmount: Decimal?
- items: Transformable
- imageData: Binary?
- ocrText: String?
- createdAt: Date
Relationships
- Item -> Location (many-to-one)
- Item -> Photos (one-to-many)
- Item -> Receipts (many-to-many)
- Location -> Location (self-referential for hierarchy)
Migration Strategy
- Version 1: Initial schema
- Include lightweight migration support
- Plan for future CloudKit integration
Acceptance Criteria
- .xcdatamodeld file created with all entities
- Proper data types and constraints
- Relationships configured correctly
- Indexes on frequently queried fields
- Migration policy defined
- NSManagedObject subclasses generated
Copilot
Metadata
Metadata
Assignees
Labels
P0Production blocker - must fix immediatelyProduction blocker - must fix immediatelycore-dataCore Data framework relatedCore Data framework relatedenhancementNew feature or requestNew feature or requestsub-taskPart of a larger epicPart of a larger epic