change folder structure

This commit is contained in:
Julian Krauser 2025-02-15 10:59:54 +01:00
parent a332e4d779
commit a09c75a998
167 changed files with 262 additions and 246 deletions

View file

@ -0,0 +1,31 @@
import { Column, Entity, ManyToOne, PrimaryColumn } from "typeorm";
import { NewsletterConfigType } from "../../enums/newsletterConfigType";
import { communicationType } from "./communicationType";
@Entity()
export class newsletterConfig {
@PrimaryColumn()
comTypeId: number;
@Column({
type: "varchar",
length: "255",
transformer: {
to(value: NewsletterConfigType) {
return value.toString();
},
from(value: string) {
return NewsletterConfigType[value as keyof typeof NewsletterConfigType];
},
},
})
config: NewsletterConfigType;
@ManyToOne(() => communicationType, {
nullable: false,
onDelete: "CASCADE",
onUpdate: "RESTRICT",
cascade: ["insert"],
})
comType: communicationType;
}