admin管理员组文章数量:1390642
anyone can help, I want to seed our data to database, but always seems have errors to match the structure defined in the products interface, the product interface code like below:
export interface Product {
id: number;
title: string;
content: {
root: {
type: string;
children: {
type: string;
version: number;
[k: string]: unknown;
}[];
direction: ('ltr' | 'rtl') | null;
format: 'left' | 'start' | 'center' | 'right' | 'end' | 'justify' | '';
indent: number;
version: number;
};
[k: string]: unknown;
};
relatedPosts?: (number | Product)[] | null;
categories?: (number | Category)[] | null;
meta?: {
title?: string | null;
/**
* Maximum upload file size: 12MB. Recommended file size for images is <500KB.
*/
image?: (number | null) | Media;
description?: string | null;
};
publishedAt?: string | null;
authors?: (number | User)[] | null;
populatedAuthors?:
| {
id?: string | null;
name?: string | null;
}[]
| null;
/**
* Product price in dollars
*/
price: number;
slug?: string | null;
slugLock?: boolean | null;
updatedAt: string;
createdAt: string;
_status?: ('draft' | 'published') | null;
}
anyone can give me an format structured product data file for reference?
本文标签: postgresqlseed data to database structure match issues in nextjs projectStack Overflow
版权声明:本文标题:postgresql - seed data to database structure match issues in nextjs project - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744573279a2613466.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论