i want to save shop data which we get by shopify rest api shop.json in mongodb while installing the app my session is saved in db bu shop details is not saved. this is my schema.prisma
generator client {
provider = “prisma-client-js”
}
datasource db {
provider = “mongodb”
url = env(“DATABASE_URL”)
}
model Session {
session_id String @Id @Default (auto()) @MAP (“_id”) @db .ObjectId
id String @Unique_2
shop String @Unique_2
state String
isOnline Boolean @Default (false)
scope String?
expires DateTime?
accessToken String
userId BigInt?
firstName String?
lastName String?
email String?
accountOwner Boolean @Default (false)
locale String?
collaborator Boolean? @Default (false)
emailVerified Boolean? @Default (false)
}
model Shop {
id String @Id @Default (auto()) @MAP (“_id”) @db .ObjectId
myshopify_domain String @Unique_2
shop_id BigInt @Unique_2
name String
email String?
country String
currency String
plan_name String
shop_owner String
timezone String
primary_locale String
accessToken String?
}
how will i able to also save shop data in my db while installing the app. anyone help me with the code.(i m using remix)