change: make query id to uuid

This commit is contained in:
Julian Krauser 2025-03-26 09:10:08 +01:00
parent c0a0365406
commit df231d6462
12 changed files with 119 additions and 20 deletions

View file

@ -1,6 +1,5 @@
import { Column, Entity, ManyToOne, OneToMany, PrimaryColumn } from "typeorm";
import { newsletterDates } from "./newsletterDates";
import { member } from "../member/member";
import { newsletterRecipients } from "./newsletterRecipients";
import { query } from "../../configuration/query";
@ -27,8 +26,8 @@ export class newsletter {
@Column({ type: "boolean", default: false })
isSent: boolean;
@Column({ type: "int", nullable: true })
recipientsByQueryId?: number;
@Column({ nullable: true })
recipientsByQueryId?: string;
@OneToMany(() => newsletterDates, (dates) => dates.newsletter, { cascade: ["insert"] })
dates: newsletterDates[];

View file

@ -2,8 +2,8 @@ import { Column, Entity, PrimaryColumn } from "typeorm";
@Entity()
export class query {
@PrimaryColumn({ generated: "increment", type: "int" })
id: number;
@PrimaryColumn({ generated: "uuid", type: "varchar" })
id: string;
@Column({ type: "varchar", length: 255, unique: true })
title: string;