change: make query id to uuid
This commit is contained in:
parent
c0a0365406
commit
df231d6462
12 changed files with 119 additions and 20 deletions
|
@ -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[];
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue