Fix db relations, add sample data, show categories in frontend menu
This commit is contained in:
24
software/backend/models/account.model.ts
Normal file
24
software/backend/models/account.model.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { Table, Column, Model, HasMany } from 'sequelize-typescript';
|
||||
import { Order } from './order.model';
|
||||
|
||||
@Table
|
||||
export class Account extends Model {
|
||||
@Column
|
||||
username: string
|
||||
|
||||
@Column
|
||||
password: string
|
||||
|
||||
@Column
|
||||
address: string
|
||||
|
||||
@Column
|
||||
firstName: string
|
||||
|
||||
@Column
|
||||
lastName: string
|
||||
|
||||
// Relations
|
||||
@HasMany(() => Order)
|
||||
orders: Order[]
|
||||
}
|
||||
Reference in New Issue
Block a user