Files
bewell-in-ua/lib/db/prisma/seed/store.ts
2025-02-05 08:01:14 +02:00

56 lines
1.2 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import {Store} from '@prisma/client'
import {type prismaClientType} from '@/lib/db/prisma/seed/main'
import {slug} from '@/lib/utils'
const STORE_TITLE = 'Be Well'
const STORE_TITLE_RU = STORE_TITLE
export const storeSeed = async function (prisma: prismaClientType) {
const store: Store = await prisma.store.create({
data: {
slug: slug(STORE_TITLE),
active: true,
image: '/images/logo.svg',
storeLocale: {
create: [
{
title: STORE_TITLE,
lang: 'uk',
motto: 'подбай про себе',
slug: slug(STORE_TITLE, 'uk')
// meta: {
// create: {
// keywords: ['харчові добавки', 'вітаміни'],
// openGraph: {
// create: {
// locale: 'uk_UA'
// }
// }
// }
// }
},
{
title: STORE_TITLE_RU,
lang: 'ru',
motto: 'позаботься о себе',
slug: slug(STORE_TITLE_RU, 'ru')
// meta: {
// create: {
// keywords: ['пищевые добавки', 'витамины'],
// openGraph: {
// create: {
// locale: 'ru_UA'
// }
// }
// }
// }
}
]
}
}
})
return store
}