Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:atlp-rwanda/e-commerce-ninjas-bn…
Browse files Browse the repository at this point in the history
… into develop
  • Loading branch information
Aime-Patrick committed Aug 5, 2024
2 parents 580814e + b5d7201 commit 0869546
Show file tree
Hide file tree
Showing 21 changed files with 500 additions and 62 deletions.
7 changes: 7 additions & 0 deletions .nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"check-coverage": true,
"lines": 80,
"statements": 80,
"functions": 70,
"branches": 70
}
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
"postinstall": "husky install"
},
"nyc": {
"lines": 70,
"statements": 70,
"functions": 70,
"branches": 70,
"extends": "@istanbuljs/nyc-config-typescript",
"include": [
"src/**/!(*.test.*).[tj]s?(x)"
Expand Down
8 changes: 4 additions & 4 deletions src/databases/seeders/20240520202759-users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,10 @@ const userTen = {
id: userTenId,
createdAt: new Date(),
updatedAt: new Date(),
passwordUpdatedAt: new Date(),
firstName: "F Buyer3",
lastName: "L Buyer3",
email: "buyer3@gmail.com",
passwordUpdatedAt: new Date("2020-01-01T12:00:00Z"),
firstName: "Aime",
lastName: "Patrick",
email: "aimepatrick64@gmail.com",
password: hashPassword("Password@123"),
phone: 25089767899,
profilePicture: "https://res.cloudinary.com/djrmfg6k9/image/upload/v1720294521/cce1ffu7uw3j2vg9s2vl.jpg",
Expand Down
21 changes: 19 additions & 2 deletions src/databases/seeders/20240601224834-shops.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { QueryInterface } from "sequelize";
import { shopOneId, shopTwoId, userFourId, userSevenId } from "../../types/uuid";
import { shopFourId, shopOneId, shopThreeId, shopTwoId, userFourId, userSevenId, userSixId } from "../../types/uuid";

const shopOne = {
id: shopOneId,
Expand All @@ -19,8 +19,25 @@ const shopTwo = {
updatedAt: new Date()
}

const shopThree = {
id: shopThreeId,
name: "Shoes Shop 509",
userId: userFourId,
description: "Selling",
createdAt: new Date(),
updatedAt: new Date()
}
const shopFour = {
id: shopFourId,
name: "electronic Shop 509",
userId: userSixId,
description: "Selling",
createdAt: new Date(),
updatedAt: new Date()
}

export const up = async (queryInterface: QueryInterface) => {
await queryInterface.bulkInsert("shops", [shopOne, shopTwo]);
await queryInterface.bulkInsert("shops", [shopOne, shopTwo,shopThree,shopFour]);
};

export const down = async (queryInterface: QueryInterface) => {
Expand Down
Loading

0 comments on commit 0869546

Please sign in to comment.