Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,789 changes: 2,360 additions & 429 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@
"scripts": {
"dev": "ts-node-dev --respawn src/app.ts",
"build": "tsc",
"start": "node --enable-source-maps dist/app.js"
"start": "node --enable-source-maps dist/app.js",
"ssh": "dotenv -- bash -c 'ssh -i \"$SSH_KEY_PATH\" -L 5050:$DB_HOST:5432 $EC2_USER_NAME@$EC2_HOST'",
"seed": "ts-node prisma/seed.ts"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"dependencies": {
"@aws-sdk/client-s3": "^3.839.0",
"@prisma/client": "^6.7.0",
"bcrypt": "^5.1.1",
"cors": "^2.8.5",
Expand All @@ -27,7 +30,10 @@
"@types/express": "^5.0.1",
"@types/jsonwebtoken": "^9.0.9",
"@types/multer": "^1.4.13",
"@types/multer-s3": "^3.0.3",
"@types/node": "^22.13.10",
"dotenv-cli": "^8.0.0",
"multer-s3": "^3.0.1",
"nodemon": "^3.1.9",
"prisma": "^6.7.0",
"ts-node-dev": "^2.0.0",
Expand Down
36 changes: 21 additions & 15 deletions prisma/mock/articleMock.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
type TArticle = {
id: number;
title: string;
content: string;
authorId: string;
Expand All @@ -17,79 +18,84 @@ type TArticleLike = {

export const ARTICLE_MOCK: TArticle = [
{
id: 1,
title: "시드 데이터 1",
content: "시드 데이터 입니다.",
authorId: "임시",
authorId: "",
},
{
id: 2,
title: "시드 데이터 2",
content: "시드 데이터 입니다.",
authorId: "임시",
authorId: "",
},
{
id: 3,
title: "시드 데이터 3",
content: "시드 데이터 입니다.",
authorId: "임시",
authorId: "",
},
{
id: 4,
title: "시드 데이터 4",
content: "시드 데이터 입니다.",
authorId: "임시",
authorId: "",
},
{
id: 5,
title: "시드 데이터 5",
content: "시드 데이터 입니다.",
authorId: "임시",
authorId: "",
},
];

export const ARTICLE_COMMENT_MOCK: TArticleComment = [
{
content: "댓글 시드 데이터 1",
articleId: 1,
authorId: "임시",
authorId: "",
},
{
content: "댓글 시드 데이터 2",
articleId: 2,
authorId: "임시",
authorId: "",
},
{
content: "댓글 시드 데이터 3",
articleId: 3,
authorId: "임시",
authorId: "",
},
{
content: "댓글 시드 데이터 4",
articleId: 4,
authorId: "임시",
authorId: "",
},
{
content: "댓글 시드 데이터 5",
articleId: 5,
authorId: "임시",
authorId: "",
},
];

export const ARTICLE_LIKE_MOCK: TArticleLike = [
{
userId: "임시",
userId: "",
articleId: 1,
},
{
userId: "임시",
userId: "",
articleId: 2,
},
{
userId: "임시",
userId: "",
articleId: 3,
},
{
userId: "임시",
userId: "",
articleId: 4,
},
{
userId: "임시",
userId: "",
articleId: 5,
},
];
126 changes: 111 additions & 15 deletions prisma/mock/productMock.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
type TProduct = {
id: number;
name: string;
description: string;
price: number;
authorId: string;
}[];

type TTag = {
id: number;
name: string;
}[];

type TProductTag = {
productId: number;
tagId: number;
}[];

type TProductComment = {
content: string;
productId: number;
Expand All @@ -16,86 +27,171 @@ type TProductLike = {
productId: number;
}[];

type TProductImage = {
imageUrl: string;
userId: string;
productId: number;
}[];

export const PRODUCT_MOCK: TProduct = [
{
id: 1,
name: "상품 시드 데이터 1",
description: "상품 설명 시드 데이터 1",
price: 10000,
authorId: "임시",
authorId: "",
},
{
id: 2,
name: "상품 시드 데이터 2",
description: "상품 설명 시드 데이터 2",
price: 20000,
authorId: "임시",
authorId: "",
},
{
id: 3,
name: "상품 시드 데이터 3",
description: "상품 설명 시드 데이터 3",
price: 30000,
authorId: "임시",
authorId: "",
},
{
id: 4,
name: "상품 시드 데이터 4",
description: "상품 설명 시드 데이터 4",
price: 40000,
authorId: "임시",
authorId: "",
},
{
id: 5,
name: "상품 시드 데이터 5",
description: "상품 설명 시드 데이터 5",
price: 50000,
authorId: "임시",
authorId: "",
},
];

export const TAG_MOCK: TTag = [
{
id: 1,
name: "전자제품",
},
{
id: 2,
name: "노트북",
},
{
id: 3,
name: "휴대폰",
},
{
id: 4,
name: "태블릿",
},
{
id: 5,
name: "PC",
},
];

export const PRODUCT_TAG_MOCK: TProductTag = [
{
productId: 1,
tagId: 1,
},
{
productId: 2,
tagId: 2,
},
{
productId: 3,
tagId: 3,
},
{
productId: 4,
tagId: 4,
},
{
productId: 5,
tagId: 5,
},
];

export const PRODUCT_COMMENT_MOCK: TProductComment = [
{
content: "상품 댓글 시드 데이터 1",
productId: 1,
authorId: "임시",
authorId: "",
},
{
content: "상품 댓글 시드 데이터 2",
productId: 2,
authorId: "임시",
authorId: "",
},
{
content: "상품 댓글 시드 데이터 3",
productId: 3,
authorId: "임시",
authorId: "",
},
{
content: "상품 댓글 시드 데이터 4",
productId: 4,
authorId: "임시",
authorId: "",
},
{
content: "상품 댓글 시드 데이터 5",
productId: 5,
authorId: "임시",
authorId: "",
},
];

export const PRODUCT_LIKE_MOCK: TProductLike = [
{
userId: "1",
userId: "",
productId: 1,
},
{
userId: "",
productId: 2,
},
{
userId: "",
productId: 3,
},
{
userId: "",
productId: 4,
},
{
userId: "",
productId: 5,
},
];

export const PRODUCT_IMAGE_MOCK: TProductImage = [
{
imageUrl: "http://localhost:3000/image/1",
userId: "",
productId: 1,
},
{
userId: "2",
imageUrl: "http://localhost:3000/image/2",
userId: "",
productId: 2,
},
{
userId: "3",
imageUrl: "http://localhost:3000/image/3",
userId: "",
productId: 3,
},
{
userId: "4",
imageUrl: "http://localhost:3000/image/4",
userId: "",
productId: 4,
},
{
userId: "5",
imageUrl: "http://localhost:3000/image/5",
userId: "",
productId: 5,
},
];
Loading