Fix db relations, add sample data, show categories in frontend menu

This commit is contained in:
2024-09-05 16:19:23 +02:00
parent 7ca15a66b3
commit 6464521b04
23 changed files with 502 additions and 129 deletions

View File

@@ -0,0 +1,14 @@
import { Table, Column, Model, BelongsTo, ForeignKey, HasMany } from 'sequelize-typescript';
import { Product } from './product.model';
@Table
export class Category extends Model {
@Column
name: string
@Column
icon: string
@HasMany(() => Product)
product: Product
}