Extend database with more tables, rewrite API doc, improve API endpoints

This commit is contained in:
2024-09-23 21:22:45 +02:00
parent 8b4db9ccc8
commit b245e3803a
41 changed files with 1345 additions and 1126 deletions

View File

@@ -0,0 +1,27 @@
import { BelongsTo, Column, ForeignKey, Model, Table } from "sequelize-typescript";
import { Account } from "./account.model";
@Table({ timestamps: false })
export class Address extends Model {
@ForeignKey(() => Account)
@Column
accountId: number
@Column
street: string
@Column
houseNumber: number
@Column
postalCode: number
@Column
city: string
// Relations
@BelongsTo(() => Account)
account: Account
}