Redesign productDetail dialog

This commit is contained in:
2024-09-20 15:08:17 +02:00
parent 54d13686cf
commit 718dbe30b7
18 changed files with 230 additions and 174 deletions

View File

@@ -1,4 +1,4 @@
import { Table, Column, Model, ForeignKey, BelongsTo, BelongsToMany, HasMany } from 'sequelize-typescript';
import { Table, Column, Model, ForeignKey, BelongsTo, BelongsToMany, HasMany, DataType } from 'sequelize-typescript';
import { Category } from './category.model';
import { OrderItem } from './orderItem.model';
@@ -23,8 +23,17 @@ export class Product extends Model {
@Column
rating: number
@Column
imageUrl: string
@Column({
type: DataType.STRING,
get(): Array<string> {
return this.getDataValue('images').split(';')
},
set(value: Array<string>) {
console.log(value)
this.setDataValue('images', value.join(';'))
}
})
images: Array<string>
@Column
description: string