첫 완료
This commit is contained in:
BIN
prisma/dev.db
Normal file
BIN
prisma/dev.db
Normal file
Binary file not shown.
34
prisma/migrations/20251019205212_init/migration.sql
Normal file
34
prisma/migrations/20251019205212_init/migration.sql
Normal file
@@ -0,0 +1,34 @@
|
||||
-- CreateTable
|
||||
CREATE TABLE "Property" (
|
||||
"id" TEXT NOT NULL PRIMARY KEY,
|
||||
"naverPropertyId" TEXT NOT NULL,
|
||||
"title" TEXT NOT NULL,
|
||||
"address" TEXT NOT NULL,
|
||||
"detailAddress" TEXT,
|
||||
"price" INTEGER NOT NULL,
|
||||
"ranking" INTEGER,
|
||||
"userId" TEXT NOT NULL,
|
||||
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" DATETIME NOT NULL
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "Seed" (
|
||||
"id" TEXT NOT NULL PRIMARY KEY,
|
||||
"userId" TEXT NOT NULL,
|
||||
"seed" TEXT NOT NULL,
|
||||
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" DATETIME NOT NULL
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "Property_naverPropertyId_key" ON "Property"("naverPropertyId");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "Property_userId_idx" ON "Property"("userId");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "Property_naverPropertyId_idx" ON "Property"("naverPropertyId");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX "Seed_userId_key" ON "Seed"("userId");
|
||||
3
prisma/migrations/migration_lock.toml
Normal file
3
prisma/migrations/migration_lock.toml
Normal file
@@ -0,0 +1,3 @@
|
||||
# Please do not edit this file manually
|
||||
# It should be added in your version-control system (e.g., Git)
|
||||
provider = "sqlite"
|
||||
139
prisma/schema.prisma
Normal file
139
prisma/schema.prisma
Normal file
@@ -0,0 +1,139 @@
|
||||
// This is your Prisma schema file,
|
||||
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
||||
|
||||
generator client {
|
||||
provider = "prisma-client-js"
|
||||
output = "../src/generated/prisma"
|
||||
}
|
||||
|
||||
datasource db {
|
||||
provider = "sqlite"
|
||||
url = env("DATABASE_URL")
|
||||
}
|
||||
|
||||
model RealEstateArticle {
|
||||
id Int @id @default(autoincrement())
|
||||
articleNumber String @unique
|
||||
articleName String?
|
||||
buildingType String?
|
||||
tradeType String?
|
||||
realEstateType String?
|
||||
tradTpNm String?
|
||||
prcInfo String?
|
||||
leasePrc String?
|
||||
tagList String?
|
||||
atclFetrDesc String?
|
||||
atclCfmYmd String?
|
||||
pnu String?
|
||||
|
||||
// 위치 정보 (address)
|
||||
city String?
|
||||
division String?
|
||||
sector String?
|
||||
jibun String?
|
||||
fullAddress String?
|
||||
detailAddress String?
|
||||
isAddressExposed Boolean?
|
||||
xCoordinate Float?
|
||||
yCoordinate Float?
|
||||
legalDivisionNumber String?
|
||||
|
||||
// 가격 정보 (priceInfo)
|
||||
dealPrice String? // 매매가
|
||||
warrantyAmount String? // 전세 보증금
|
||||
rentAmount String? // 월세
|
||||
loan String? // 대출
|
||||
loanCode String?
|
||||
loanTypeCode String?
|
||||
|
||||
// 관리비 정보 (maintenanceFee)
|
||||
managementFeeAmount Int?
|
||||
managementFeeTypeCode String?
|
||||
managementFeeCriteriaType String?
|
||||
|
||||
// 건물 정보 (buildingInfo, facilityInfo)
|
||||
buildingUse String?
|
||||
buildingConjunctionDate String?
|
||||
buildingConjunctionDateType String?
|
||||
approvalElapsedYear Int?
|
||||
totalParkingCount String?
|
||||
isParkingPossible Boolean?
|
||||
isIllegalBuilding Boolean?
|
||||
|
||||
// 공간 정보 (spaceInfo)
|
||||
supplySpace Float? // 공급면적
|
||||
exclusiveSpace Float? // 전용면적
|
||||
landSpace Float? // 대지지분
|
||||
targetFloor String? // 해당층
|
||||
totalFloor String? // 총층
|
||||
groundTotalFloor String?
|
||||
undergroundTotalFloor String?
|
||||
floorType String?
|
||||
floorInfo String?
|
||||
residenceType String?
|
||||
roomCount Int?
|
||||
bathRoomCount Int?
|
||||
direction String?
|
||||
directionStandard String?
|
||||
duplex Boolean?
|
||||
|
||||
// 입주 정보 (movingInInfo)
|
||||
movingInNegotiation Boolean?
|
||||
movingInDate String?
|
||||
movingInType String?
|
||||
|
||||
// 중개사 정보 (agent)
|
||||
brokerName String?
|
||||
brokerageName String?
|
||||
brokerId String?
|
||||
brokerAddress String?
|
||||
brokerPhone String?
|
||||
businessRegistrationNumber String?
|
||||
ownerConfirmationSaleCount Int?
|
||||
cpId String?
|
||||
cpNm String?
|
||||
|
||||
// 매물 상세 설명
|
||||
articleDescription String?
|
||||
articleFeature String?
|
||||
isDirectTrade Boolean?
|
||||
isSafeLessorOfHug Boolean?
|
||||
|
||||
// 미디어 정보
|
||||
imageUrl String?
|
||||
imageCount Int?
|
||||
isVrExposed Boolean?
|
||||
|
||||
// 검증/노출 정보 (verificationInfo)
|
||||
verificationType String?
|
||||
isAssociationArticle Boolean?
|
||||
exposureStartDate String?
|
||||
articleConfirmDate String?
|
||||
|
||||
// 편의시설 (facilityInfo - JSON 배열로 저장)
|
||||
facilityLife String? // JSON array
|
||||
facilitySecurity String? // JSON array
|
||||
facilityEtc String? // JSON array
|
||||
facilityAircon String? // JSON array
|
||||
|
||||
// 원본 JSON 전체 (보존용)
|
||||
jsonData Json
|
||||
|
||||
isActive Boolean @default(true)
|
||||
realtorId String?
|
||||
|
||||
// 생성/수정 시간
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
// 랭킹 관련
|
||||
ranking Int?
|
||||
cortarNo String?
|
||||
lgeo String?
|
||||
rankCheckDate String?
|
||||
|
||||
@@index([articleNumber])
|
||||
@@index([tradeType])
|
||||
@@index([realEstateType])
|
||||
@@index([city, division])
|
||||
}
|
||||
Reference in New Issue
Block a user