enhance: provide latest inserted internal Id

This commit is contained in:
Julian Krauser 2025-04-30 12:22:38 +02:00
parent a827185bf1
commit a6229bb77c
6 changed files with 83 additions and 5 deletions

View file

@ -1,4 +1,14 @@
import { Column, ColumnType, Entity, JoinColumn, ManyToOne, OneToMany, OneToOne, PrimaryColumn } from "typeorm";
import {
Column,
ColumnType,
CreateDateColumn,
Entity,
JoinColumn,
ManyToOne,
OneToMany,
OneToOne,
PrimaryColumn,
} from "typeorm";
import { membership } from "./membership";
import { memberAwards } from "./memberAwards";
import { memberQualifications } from "./memberQualifications";
@ -30,6 +40,9 @@ export class member {
@Column()
salutationId: number;
@CreateDateColumn()
createdAt: Date;
@ManyToOne(() => salutation, (salutation) => salutation.members, {
nullable: false,
onDelete: "RESTRICT",