Skip to content

Fix/mos 0004#9

Merged
Lidizz merged 4 commits into
mainfrom
fix/MOS-0004
Feb 25, 2026
Merged

Fix/mos 0004#9
Lidizz merged 4 commits into
mainfrom
fix/MOS-0004

Conversation

@Lidizz

@Lidizz Lidizz commented Feb 25, 2026

Copy link
Copy Markdown
Owner

No description provided.

…asset_price

Rename tables, FK column, indexes, and constraints so the schema matches
the unified asset domain model (stocks, ETFs, indexes, future crypto).

All operations are metadata-only ALTER  RENAME  instant regardless of
table size, no data copy required.

Changes:
- stocks           asset
- stock_prices     asset_price
- stock_id column  asset_id
- 6 indexes renamed (idx_stocks_*  idx_asset_*, idx_stock_prices_*  idx_asset_price_*)
- uq_stock_price_date  uq_asset_price_date
- Table/column comments updated
Rename all Java classes, interfaces, and references:
- Stock -> Asset, StockPrice -> AssetPrice (domain model)
- StockRepository -> AssetRepository, StockPriceRepository -> AssetPriceRepository
- StockService -> AssetService, StockController -> AssetController
- StockDTO -> AssetDTO, StockNotFoundException -> AssetNotFoundException
- StockPriceUpdateScheduler -> AssetPriceUpdateScheduler
- CsvStockDataImporter -> CsvAssetDataImporter
- StockServiceTest -> AssetServiceTest

Update all JPQL queries, field names, method names, imports,
log messages, javadoc, and test mocks to use new naming.

Add CRYPTO to AssetType enum with -USD/-USDT symbol detection.

API endpoint changed: /api/stocks -> /api/assets

Note: StockDataProvider interface retained (renamed in next commit).
Rename provider interface and inner types:
- StockDataProvider -> MarketDataProvider
- StockProfile -> AssetProfile
- StockDataException -> MarketDataException
- getStockProfile() -> getAssetProfile()

Update all implementations and consumers:
- TwelveDataClient: implements MarketDataProvider
- AlphaVantageClient: implements MarketDataProvider
- AssetPriceUpdateScheduler: MarketDataProvider field
- TwelveDataSeederService: MarketDataProvider field,
  all qualified type references updated
…ices, and tests

- Rename stockApi.ts -> assetApi.ts with updated method names
- Rename StockSelector.tsx/css -> AssetSelector.tsx/css
- Update all component props: stocks -> assets, Stock -> Asset
- Update SimulatorPage, InvestmentBuilder, InvestmentForm consumers
- Update SectorFilter to use assetApi
- Update PortfolioHeader variable names and CSS classes
- Update SimulationResults table header and CSS class
- Update test file with new API names and endpoints
- Update cosmetic references in comments and tooltips
- Add CRYPTO to AssetType union in api.types.ts
@Lidizz
Lidizz merged commit 48d2040 into main Feb 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant