Files
Autoparts-DB/pos/migrations/v1.7_plates.sql
consultoria-as 4cc2c66208 feat(pos): add plate lookup (#8), 326 translations (#12), bulk image import (#11)
- Plate lookup: new plate_vehicles table (v1.7 migration), plate_lookup
  service with Mexican plate validation, GET/POST endpoints on catalog_bp,
  plate search UI in catalog vehicle selector
- Translations: extend PART_TRANSLATIONS from ~80 to 326 entries covering
  brake, engine, fuel, cooling, electrical, drivetrain, suspension, steering,
  exhaust, A/C, lighting, body, interior, fluids, and category translations
- Bulk images: image_scraper service with download+resize+placeholder
  generation, bulk-images and auto-image endpoints on inventory_bp

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 04:17:55 +00:00

17 lines
572 B
SQL

-- Plate-to-vehicle lookup table (tenant DB)
-- Allows instant vehicle identification from Mexican license plates.
CREATE TABLE IF NOT EXISTS plate_vehicles (
id SERIAL PRIMARY KEY,
plate VARCHAR(20) UNIQUE NOT NULL,
make VARCHAR(100),
model VARCHAR(100),
year INTEGER,
vin VARCHAR(17),
customer_id INTEGER REFERENCES customers(id),
created_at TIMESTAMPTZ DEFAULT NOW()
);
CREATE INDEX IF NOT EXISTS idx_plate_vehicles_plate ON plate_vehicles(plate);
CREATE INDEX IF NOT EXISTS idx_plate_vehicles_customer ON plate_vehicles(customer_id);