Files
Laca-City/backend/dist/database/seeds/parking-lots.seed.js
PhongPham c65cc97a33 🎯 MapView v2.0 - Global Deployment Ready
 MAJOR FEATURES:
• Auto-zoom intelligence với smart bounds fitting
• Enhanced 3D GPS markers với pulsing effects
• Professional route display với 6-layer rendering
• Status-based parking icons với availability indicators
• Production-ready build optimizations

🗺️ AUTO-ZOOM FEATURES:
• Smart bounds fitting cho GPS + selected parking
• Adaptive padding (50px) cho visual balance
• Max zoom control (level 16) để tránh quá gần
• Dynamic centering khi không có selection

🎨 ENHANCED VISUALS:
• 3D GPS marker với multi-layer pulse effects
• Advanced parking icons với status colors
• Selection highlighting với animation
• Dimming system cho non-selected items

🛣️ ROUTE SYSTEM:
• OpenRouteService API integration
• Multi-layer route rendering (glow, shadow, main, animated)
• Real-time distance & duration calculation
• Visual route info trong popup

📱 PRODUCTION READY:
• SSR safe với dynamic imports
• Build errors resolved
• Global deployment via Vercel
• Optimized performance

🌍 DEPLOYMENT:
• Vercel: https://whatever-ctk2auuxr-phong12hexdockworks-projects.vercel.app
• Bundle size: 22.8 kB optimized
• Global CDN distribution
• HTTPS enabled

💾 VERSION CONTROL:
• MapView-v2.0.tsx backup created
• MAPVIEW_VERSIONS.md documentation
• Full version history tracking
2025-07-20 19:52:16 +07:00

254 lines
8.2 KiB
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.seedParkingLots = seedParkingLots;
const parking_lot_entity_1 = require("../../modules/parking/entities/parking-lot.entity");
async function seedParkingLots(dataSource) {
const parkingRepository = dataSource.getRepository(parking_lot_entity_1.ParkingLot);
const parkingLots = [
{
name: 'Central Mall Parking',
address: '123 Orchard Road, Singapore 238872',
lat: 1.3048,
lng: 103.8318,
location: `POINT(103.8318 1.3048)`,
hourlyRate: 5.00,
openTime: '06:00',
closeTime: '24:00',
availableSlots: 45,
totalSlots: 200,
amenities: {
covered: true,
security: true,
ev_charging: true,
wheelchair_accessible: true,
valet_service: false,
},
contactInfo: {
phone: '+65 6123 4567',
email: 'parking@centralmall.sg',
website: 'https://centralmall.sg/parking',
},
},
{
name: 'Marina Bay Business District Parking',
address: '8 Marina Boulevard, Singapore 018981',
lat: 1.2802,
lng: 103.8537,
location: `POINT(103.8537 1.2802)`,
hourlyRate: 8.50,
openTime: '00:00',
closeTime: '23:59',
availableSlots: 12,
totalSlots: 150,
amenities: {
covered: true,
security: true,
ev_charging: true,
wheelchair_accessible: true,
valet_service: true,
},
contactInfo: {
phone: '+65 6234 5678',
email: 'parking@marinabay.sg',
},
},
{
name: 'Chinatown Heritage Parking',
address: '48 Pagoda Street, Singapore 059207',
lat: 1.2838,
lng: 103.8444,
location: `POINT(103.8444 1.2838)`,
hourlyRate: 3.50,
openTime: '07:00',
closeTime: '22:00',
availableSlots: 8,
totalSlots: 80,
amenities: {
covered: false,
security: true,
ev_charging: false,
wheelchair_accessible: true,
valet_service: false,
},
contactInfo: {
phone: '+65 6345 6789',
},
},
{
name: 'Sentosa Island Resort Parking',
address: '39 Artillery Avenue, Singapore 099958',
lat: 1.2494,
lng: 103.8303,
location: `POINT(103.8303 1.2494)`,
hourlyRate: 6.00,
openTime: '06:00',
closeTime: '02:00',
availableSlots: 78,
totalSlots: 300,
amenities: {
covered: true,
security: true,
ev_charging: true,
wheelchair_accessible: true,
valet_service: true,
},
contactInfo: {
phone: '+65 6456 7890',
email: 'parking@sentosa.sg',
website: 'https://sentosa.sg/parking',
},
},
{
name: 'Clarke Quay Entertainment Parking',
address: '3E River Valley Road, Singapore 179024',
lat: 1.2897,
lng: 103.8467,
location: `POINT(103.8467 1.2897)`,
hourlyRate: 7.00,
openTime: '10:00',
closeTime: '04:00',
availableSlots: 23,
totalSlots: 120,
amenities: {
covered: true,
security: true,
ev_charging: false,
wheelchair_accessible: true,
valet_service: false,
},
contactInfo: {
phone: '+65 6567 8901',
email: 'parking@clarkequay.sg',
},
},
{
name: 'Little India Cultural Parking',
address: '48 Serangoon Road, Singapore 217959',
lat: 1.3093,
lng: 103.8522,
location: `POINT(103.8522 1.3093)`,
hourlyRate: 4.00,
openTime: '05:00',
closeTime: '23:00',
availableSlots: 34,
totalSlots: 100,
amenities: {
covered: false,
security: true,
ev_charging: false,
wheelchair_accessible: false,
valet_service: false,
},
contactInfo: {
phone: '+65 6678 9012',
},
},
{
name: 'Changi Airport Terminal Parking',
address: 'Airport Boulevard, Singapore 819663',
lat: 1.3644,
lng: 103.9915,
location: `POINT(103.9915 1.3644)`,
hourlyRate: 4.50,
openTime: '00:00',
closeTime: '23:59',
availableSlots: 156,
totalSlots: 800,
amenities: {
covered: true,
security: true,
ev_charging: true,
wheelchair_accessible: true,
valet_service: true,
},
contactInfo: {
phone: '+65 6789 0123',
email: 'parking@changiairport.sg',
website: 'https://changiairport.com/parking',
},
},
{
name: 'Bugis Street Shopping Parking',
address: '3 New Bugis Street, Singapore 188867',
lat: 1.3006,
lng: 103.8558,
location: `POINT(103.8558 1.3006)`,
hourlyRate: 5.50,
openTime: '08:00',
closeTime: '23:00',
availableSlots: 67,
totalSlots: 180,
amenities: {
covered: true,
security: true,
ev_charging: false,
wheelchair_accessible: true,
valet_service: false,
},
contactInfo: {
phone: '+65 6890 1234',
email: 'parking@bugisstreet.sg',
},
},
{
name: 'Jurong East Hub Parking',
address: '1 Jurong West Central 2, Singapore 648886',
lat: 1.3329,
lng: 103.7436,
location: `POINT(103.7436 1.3329)`,
hourlyRate: 3.00,
openTime: '06:00',
closeTime: '24:00',
availableSlots: 89,
totalSlots: 250,
amenities: {
covered: true,
security: true,
ev_charging: true,
wheelchair_accessible: true,
valet_service: false,
},
contactInfo: {
phone: '+65 6901 2345',
email: 'parking@jurongeast.sg',
},
},
{
name: 'East Coast Park Recreation Parking',
address: 'East Coast Park Service Road, Singapore 449876',
lat: 1.3018,
lng: 103.9057,
location: `POINT(103.9057 1.3018)`,
hourlyRate: 2.50,
openTime: '05:00',
closeTime: '02:00',
availableSlots: 145,
totalSlots: 400,
amenities: {
covered: false,
security: false,
ev_charging: false,
wheelchair_accessible: true,
valet_service: false,
},
contactInfo: {
phone: '+65 6012 3456',
},
},
];
for (const lotData of parkingLots) {
const existingLot = await parkingRepository.findOne({
where: { name: lotData.name },
});
if (!existingLot) {
const lot = parkingRepository.create(lotData);
await parkingRepository.save(lot);
console.log(`Created parking lot: ${lotData.name}`);
}
else {
console.log(`Parking lot already exists: ${lotData.name}`);
}
}
console.log('Parking lots seeding completed');
}
//# sourceMappingURL=parking-lots.seed.js.map