14 lines
280 B
TypeScript
14 lines
280 B
TypeScript
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
|
|
} |