enhance: sort newsletter by creation date

This commit is contained in:
Julian Krauser 2025-05-29 11:12:33 +02:00
parent d7a0ee694f
commit 2357497d3a
4 changed files with 28 additions and 1 deletions

View file

@ -1,4 +1,4 @@
import { Column, Entity, ManyToOne, OneToMany, PrimaryColumn } from "typeorm";
import { Column, CreateDateColumn, Entity, ManyToOne, OneToMany, PrimaryColumn } from "typeorm";
import { newsletterDates } from "./newsletterDates";
import { newsletterRecipients } from "./newsletterRecipients";
import { query } from "../../configuration/query";
@ -14,6 +14,9 @@ export class newsletter {
@Column({ type: "varchar", length: 255, default: "" })
description: string;
@CreateDateColumn()
createdAt: Date;
@Column({ type: "text", default: "" })
newsletterTitle: string;