Update application features and add scripts (core changes)

This commit is contained in:
AyrisAI
2026-07-19 11:38:56 +03:00
parent a36b833e00
commit da84cdc231
44 changed files with 2953 additions and 449 deletions
+48
View File
@@ -0,0 +1,48 @@
import { config } from 'dotenv'
config()
import fs from 'fs'
import path from 'path'
async function getPrisma() {
const { db } = await import('./lib/db')
return db
}
async function main() {
const prisma = await getPrisma()
console.log('Süit Daire 1 aranıyor...')
const suiteRoom = await prisma.room.findFirst({
where: { nameTr: { contains: 'Süit Daire 1' } }
})
if (!suiteRoom) {
console.error('Süit Daire 1 bulunamadı!')
return
}
console.log('Standart Oda 1 (25m²) aranıyor...')
const standardRoom = await prisma.room.findFirst({
where: { nameTr: { contains: 'Standart Oda 1' } }
})
if (!standardRoom) {
console.error('Standart Oda 1 bulunamadı!')
return
}
console.log('Resimler kopyalanıyor...')
await prisma.room.update({
where: { id: standardRoom.id },
data: {
imageUrl: suiteRoom.imageUrl,
images: suiteRoom.images
}
})
console.log('Standart Oda 1 resimleri başarıyla güncellendi!')
await prisma.$disconnect()
}
main().catch(console.error)