turash/docs/concept/schemas/shared_asset.json
Damir Mukimov 000eab4740
Major repository reorganization and missing backend endpoints implementation
Repository Structure:
- Move files from cluttered root directory into organized structure
- Create archive/ for archived data and scraper results
- Create bugulma/ for the complete application (frontend + backend)
- Create data/ for sample datasets and reference materials
- Create docs/ for comprehensive documentation structure
- Create scripts/ for utility scripts and API tools

Backend Implementation:
- Implement 3 missing backend endpoints identified in gap analysis:
  * GET /api/v1/organizations/{id}/matching/direct - Direct symbiosis matches
  * GET /api/v1/users/me/organizations - User organizations
  * POST /api/v1/proposals/{id}/status - Update proposal status
- Add complete proposal domain model, repository, and service layers
- Create database migration for proposals table
- Fix CLI server command registration issue

API Documentation:
- Add comprehensive proposals.md API documentation
- Update README.md with Users and Proposals API sections
- Document all request/response formats, error codes, and business rules

Code Quality:
- Follow existing Go backend architecture patterns
- Add proper error handling and validation
- Match frontend expected response schemas
- Maintain clean separation of concerns (handler -> service -> repository)
2025-11-25 06:01:16 +01:00

89 lines
2.4 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://cityresourcegraph.com/schemas/shared_asset.json",
"title": "Shared Asset Entity",
"description": "Equipment/Infrastructure at specific sites that can be shared among businesses",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Unique shared asset identifier"
},
"site_id": {
"type": "string",
"format": "uuid",
"description": "Site where this asset is located"
},
"owner_business_id": {
"type": "string",
"format": "uuid",
"description": "Business that owns this asset"
},
"type": {
"type": "string",
"enum": ["infrastructure", "utilities", "equipment", "space"],
"description": "Type of shared asset"
},
"description": {
"type": "string",
"maxLength": 1000,
"description": "Detailed description of the asset"
},
"capacity": {
"type": "number",
"description": "Asset capacity (kW, m3/h, m2, etc.)"
},
"capacity_unit": {
"type": "string",
"maxLength": 50,
"description": "Unit of capacity measurement"
},
"utilization_rate": {
"type": "number",
"minimum": 0,
"maximum": 1,
"description": "Current usage percentage (0-1)"
},
"availability_period": {
"type": "string",
"maxLength": 255,
"description": "When the asset is available for sharing"
},
"cost_sharing_model": {
"type": "string",
"maxLength": 255,
"description": "How costs are shared among users"
},
"current_users": {
"type": "array",
"items": {
"type": "string",
"format": "uuid"
},
"description": "Business IDs currently using this asset"
},
"maintenance_schedule": {
"type": "string",
"maxLength": 500,
"description": "Scheduled maintenance periods"
},
"operational_status": {
"type": "string",
"enum": ["operational", "maintenance", "out_of_service"],
"default": "operational",
"description": "Current operational status"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
},
"required": ["id", "site_id", "owner_business_id", "type", "description"],
"additionalProperties": false
}