import { Model, Table, Column, DataType } from "sequelize-typescript"; @Table export class Product extends Model { @Column({ type: DataType.STRING, allowNull: false, }) name: string; @Column({ type: DataType.STRING, allowNull: false, }) description: string; @Column({ type: DataType.DECIMAL(10, 2), allowNull: false, }) price: number; @Column({ type: DataType.STRING, allowNull: true, }) imageUrl: string; @Column({ type: DataType.ARRAY(DataType.STRING), allowNull: true, }) tags: string[]; @Column({ type: DataType.INTEGER, allowNull: false, defaultValue: 0, }) quantity: number; @Column({ type: DataType.STRING, allowNull: true, }) brand: string; @Column({ type: DataType.STRING, allowNull: true, }) color: string; @Column({ type: DataType.STRING, allowNull: false, }) category: string; }