Skip to content

Commit

Permalink
Correct mistake to product
Browse files Browse the repository at this point in the history
  • Loading branch information
sevelinCa committed May 22, 2024
1 parent c2a396d commit 2e0c36c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/database/models/product.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { ftruncate } from "fs";
public price!: string
public quantity!: number
public category!: string
public isVerfied?: boolean

static associate(models: any) {
Product.hasMany(models.Wishlist,{
foreignKey: 'productId',
Expand All @@ -37,7 +37,7 @@ import { ftruncate } from "fs";
price: {type:DataTypes.INTEGER,allowNull: false},
quantity: {type:DataTypes.INTEGER,allowNull: true},
category: {type:DataTypes.STRING,allowNull: true},
isVerfied: {type:DataTypes.BOOLEAN,defaultValue: false}


}, {
sequelize: connectSequelize,
Expand Down
4 changes: 3 additions & 1 deletion src/database/models/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import connectSequelize from "../config/db.config";
public cartId?: string
public role!: string
public profile?: string
public isVerfied?: boolean

static associate(models: any) {
User.hasMany(models.Rating,{
Expand All @@ -37,7 +38,8 @@ import connectSequelize from "../config/db.config";
wishlistId: {type:DataTypes.STRING},
cartId: {type:DataTypes.STRING},
role: {type:DataTypes.STRING,defaultValue:'buyer'},
profile: {type:DataTypes.STRING,defaultValue: "https://thumbs.dreamstime.com/b/default-avatar-profile-vector-user-profile-default-avatar-profile-vector-user-profile-profile-179376714.jpg"},
profile: {type:DataTypes.STRING,defaultValue: "https://thumbs.dreamstime.com/b/default-avatar-profile-vector-user-profile-default-avatar-profile-vector-user-profile-profile-179376714.jpg"},
isVerfied: {type:DataTypes.BOOLEAN,defaultValue: false}
}, {
sequelize: connectSequelize,
modelName: 'User',
Expand Down

0 comments on commit 2e0c36c

Please sign in to comment.