added interest code in the interest table

This commit is contained in:
2026-02-26 18:19:45 +05:30
parent 41d33b72a3
commit eb34edaedb
2 changed files with 24 additions and 24 deletions

View File

@@ -439,6 +439,7 @@ model Interests {
interestName String @unique @map("interest_name") @db.VarChar(50)
interestColor String @map("interest_color") @db.VarChar(20)
interestImage String @map("interest_image") @db.VarChar(500)
interestCode String @unique @map("interest_code")@db.VarChar(10)
displayOrder Int @map("display_order")
isActive Boolean @default(true) @map("is_active")
createdAt DateTime @default(now()) @map("created_at")
@@ -1581,7 +1582,6 @@ model ScheduleDetails {
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
deletedAt DateTime? @map("deleted_at")
cancellations Cancellations[]
@@map("schedule_details")
@@schema("sch")
@@ -1617,17 +1617,17 @@ model ScheduleRecurrence {
}
model Cancellations {
id Int @id @default(autoincrement())
scheduleHeaderXid Int @map("schedule_header_xid")
scheduleHeader ScheduleHeader @relation(fields: [scheduleHeaderXid], references: [id], onDelete: Cascade)
occurenceDate DateTime? @map("occurence_date")
slotXid Int @map("slot_xid")
slot ScheduleDetails @relation(fields: [slotXid], references: [id], onDelete: Cascade)
cancellationReason String? @map("cancellation_reason")
isActive Boolean @default(true) @map("is_active")
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
deletedAt DateTime? @map("deleted_at")
id Int @id @default(autoincrement())
scheduleHeaderXid Int @map("schedule_header_xid")
scheduleHeader ScheduleHeader @relation(fields: [scheduleHeaderXid], references: [id], onDelete: Cascade)
occurenceDate DateTime? @map("occurence_date")
startTime String @map("start_time") @db.VarChar(30)
endTime String @map("end_time") @db.VarChar(30)
cancellationReason String? @map("cancellation_reason")
isActive Boolean @default(true) @map("is_active")
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
deletedAt DateTime? @map("deleted_at")
@@map("cancellations")
@@schema("sch")

View File

@@ -220,62 +220,62 @@ async function main() {
const chillandzen = await prisma.interests.upsert({
where: { interestName: 'Chill & Zen' },
update: {},
create: { interestName: 'Chill & Zen', displayOrder: 1, interestColor: 'Blue', interestImage: 'https://minglar-dev-bucket.s3.ap-south-1.amazonaws.com/StaticImages/InterestTypes/ChillandZen.png' },
create: { interestName: 'Chill & Zen', displayOrder: 1, interestColor: 'Blue', interestImage: 'https://minglar-dev-bucket.s3.ap-south-1.amazonaws.com/StaticImages/InterestTypes/ChillandZen.png', interestCode: 'CZ' },
});
const artsyfeels = await prisma.interests.upsert({
where: { interestName: 'Artsy Feels' },
update: {},
create: { interestName: 'Artsy Feels', displayOrder: 2, interestColor: 'Blue', interestImage: 'https://minglar-dev-bucket.s3.ap-south-1.amazonaws.com/StaticImages/InterestTypes/ArtsyFeels.png' },
create: { interestName: 'Artsy Feels', displayOrder: 2, interestColor: 'Blue', interestImage: 'https://minglar-dev-bucket.s3.ap-south-1.amazonaws.com/StaticImages/InterestTypes/ArtsyFeels.png', interestCode: 'AF' },
});
const sweatmode = await prisma.interests.upsert({
where: { interestName: 'Sweat Mode' },
update: {},
create: { interestName: 'Sweat Mode', displayOrder: 3, interestColor: 'Blue', interestImage: 'https://minglar-dev-bucket.s3.ap-south-1.amazonaws.com/StaticImages/InterestTypes/SweatMode.png' },
create: { interestName: 'Sweat Mode', displayOrder: 3, interestColor: 'Blue', interestImage: 'https://minglar-dev-bucket.s3.ap-south-1.amazonaws.com/StaticImages/InterestTypes/SweatMode.png', interestCode: 'SM' },
});
const gamecraft = await prisma.interests.upsert({
where: { interestName: 'Gamecraft' },
update: {},
create: { interestName: 'Gamecraft', displayOrder: 4, interestColor: 'Blue', interestImage: 'https://minglar-dev-bucket.s3.ap-south-1.amazonaws.com/StaticImages/InterestTypes/Gamecraft.png' },
create: { interestName: 'Gamecraft', displayOrder: 4, interestColor: 'Blue', interestImage: 'https://minglar-dev-bucket.s3.ap-south-1.amazonaws.com/StaticImages/InterestTypes/Gamecraft.png', interestCode: 'GC' },
});
const wildandfree = await prisma.interests.upsert({
where: { interestName: 'Wild & Free' },
update: {},
create: { interestName: 'Wild & Free', displayOrder: 5, interestColor: 'Blue', interestImage: 'https://minglar-dev-bucket.s3.ap-south-1.amazonaws.com/StaticImages/InterestTypes/WildandFree.png' },
create: { interestName: 'Wild & Free', displayOrder: 5, interestColor: 'Blue', interestImage: 'https://minglar-dev-bucket.s3.ap-south-1.amazonaws.com/StaticImages/InterestTypes/WildandFree.png', interestCode: 'WF' },
});
const splashlife = await prisma.interests.upsert({
where: { interestName: 'Splash Life' },
update: {},
create: { interestName: 'Splash Life', displayOrder: 6, interestColor: 'Blue', interestImage: 'https://minglar-dev-bucket.s3.ap-south-1.amazonaws.com/StaticImages/InterestTypes/SplashLife.png' },
create: { interestName: 'Splash Life', displayOrder: 6, interestColor: 'Blue', interestImage: 'https://minglar-dev-bucket.s3.ap-south-1.amazonaws.com/StaticImages/InterestTypes/SplashLife.png', interestCode: 'SL' },
});
const cultureandheritage = await prisma.interests.upsert({
where: { interestName: 'Culture & Heritage' },
update: {},
create: { interestName: 'Culture & Heritage', displayOrder: 7, interestColor: 'Blue', interestImage: 'https://minglar-dev-bucket.s3.ap-south-1.amazonaws.com/StaticImages/InterestTypes/Cultures.png' },
create: { interestName: 'Culture & Heritage', displayOrder: 7, interestColor: 'Blue', interestImage: 'https://minglar-dev-bucket.s3.ap-south-1.amazonaws.com/StaticImages/InterestTypes/Cultures.png', interestCode: 'CH' },
});
const Gastronomé = await prisma.interests.upsert({
where: { interestName: 'Gastronomé' },
update: {},
create: { interestName: 'Gastronomé', displayOrder: 8, interestColor: 'Blue', interestImage: 'https://minglar-dev-bucket.s3.ap-south-1.amazonaws.com/StaticImages/InterestTypes/Gastranome.png' },
create: { interestName: 'Gastronomé', displayOrder: 8, interestColor: 'Blue', interestImage: 'https://minglar-dev-bucket.s3.ap-south-1.amazonaws.com/StaticImages/InterestTypes/Gastranome.png', interestCode: 'GN' },
});
const sportsarena = await prisma.interests.upsert({
where: { interestName: 'Sports Arena' },
update: {},
create: { interestName: 'Sports Arena', displayOrder: 9, interestColor: 'Blue', interestImage: 'https://minglar-dev-bucket.s3.ap-south-1.amazonaws.com/StaticImages/InterestTypes/SportsArena.png' },
create: { interestName: 'Sports Arena', displayOrder: 9, interestColor: 'Blue', interestImage: 'https://minglar-dev-bucket.s3.ap-south-1.amazonaws.com/StaticImages/InterestTypes/SportsArena.png', interestCode: 'SA' },
});
const nightlifeevents = await prisma.interests.upsert({
where: { interestName: 'Nightlife & Events' },
update: {},
create: { interestName: 'Nightlife & Events', displayOrder: 10, interestColor: 'Blue', interestImage: 'https://minglar-dev-bucket.s3.ap-south-1.amazonaws.com/StaticImages/InterestTypes/NightlifeandEvents.png' },
create: { interestName: 'Nightlife & Events', displayOrder: 10, interestColor: 'Blue', interestImage: 'https://minglar-dev-bucket.s3.ap-south-1.amazonaws.com/StaticImages/InterestTypes/NightlifeandEvents.png', interestCode: 'NE' },
});
const furfam = await prisma.interests.upsert({
where: { interestName: 'Fur Fam' },
update: {},
create: { interestName: 'Fur Fam', displayOrder: 11, interestColor: 'Blue', interestImage: 'https://minglar-dev-bucket.s3.ap-south-1.amazonaws.com/StaticImages/InterestTypes/petspace.jpg' },
create: { interestName: 'Fur Fam', displayOrder: 11, interestColor: 'Blue', interestImage: 'https://minglar-dev-bucket.s3.ap-south-1.amazonaws.com/StaticImages/InterestTypes/petspace.jpg', interestCode: 'PS' },
});
const dogoodfeelgood = await prisma.interests.upsert({
where: { interestName: 'Do Good, Feel Good' },
update: {},
create: { interestName: 'Do Good, Feel Good', displayOrder: 12, interestColor: 'Blue', interestImage: 'https://minglar-dev-bucket.s3.ap-south-1.amazonaws.com/StaticImages/InterestTypes/dogoodfeelgood.png' },
create: { interestName: 'Do Good, Feel Good', displayOrder: 12, interestColor: 'Blue', interestImage: 'https://minglar-dev-bucket.s3.ap-south-1.amazonaws.com/StaticImages/InterestTypes/dogoodfeelgood.png', interestCode: 'DG' },
});
// await prisma.activityTypes.createMany({