User registration completed

This commit is contained in:
2024-09-10 20:28:24 +02:00
parent f6e4bfdf2f
commit fd06b8a9a4
14 changed files with 203 additions and 56 deletions

View File

@@ -1,23 +1,33 @@
import { Table, Column, Model, HasMany } from 'sequelize-typescript';
import { Table, Column, Model, HasMany, Unique } from 'sequelize-typescript';
import { Order } from './order.model';
@Table
export class Account extends Model {
@Unique
@Column
username: string
@Column
password: string
@Column
address: string
@Column
firstName: string
@Column
lastName: string
@Column
street: string
@Column
houseNumber: number
@Column
postalCode: number
@Column
city: string
// Relations
@HasMany(() => Order)
orders: Order[]