Multicylinders

This commit is contained in:
Bastian Wagner
2025-01-02 11:17:28 +01:00
parent 66302ff05a
commit bf64103369
12 changed files with 199 additions and 34 deletions

View File

@@ -4,6 +4,7 @@ import {
CreateDateColumn,
DeleteDateColumn,
Entity,
ManyToMany,
ManyToOne,
OneToMany,
PrimaryGeneratedColumn,
@@ -20,7 +21,7 @@ export class Cylinder {
@Column({ nullable: false, unique: true })
name: string;
@OneToMany(() => Key, (key) => key.cylinder)
@ManyToMany(() => Key, (key) => key.cylinder)
keys: Key[];
@ManyToOne(() => KeySystem, (sys) => sys.cylinders)