mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
add soft delete for transaction links
This commit is contained in:
parent
d4ce46b271
commit
01648aaa0d
@ -1,5 +1,5 @@
|
|||||||
import Decimal from 'decimal.js-light'
|
import Decimal from 'decimal.js-light'
|
||||||
import { BaseEntity, Entity, PrimaryGeneratedColumn, Column } from 'typeorm'
|
import { BaseEntity, Entity, PrimaryGeneratedColumn, Column, DeleteDateColumn } from 'typeorm'
|
||||||
import { DecimalTransformer } from '../../src/typeorm/DecimalTransformer'
|
import { DecimalTransformer } from '../../src/typeorm/DecimalTransformer'
|
||||||
|
|
||||||
@Entity('transaction_links')
|
@Entity('transaction_links')
|
||||||
@ -41,6 +41,9 @@ export class TransactionLink extends BaseEntity {
|
|||||||
})
|
})
|
||||||
createdAt: Date
|
createdAt: Date
|
||||||
|
|
||||||
|
@DeleteDateColumn()
|
||||||
|
deletedAt?: Date | null
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
type: 'datetime',
|
type: 'datetime',
|
||||||
nullable: false,
|
nullable: false,
|
||||||
|
|||||||
@ -13,6 +13,7 @@ export async function upgrade(queryFn: (query: string, values?: any[]) => Promis
|
|||||||
\`memo\` varchar(255) NOT NULL,
|
\`memo\` varchar(255) NOT NULL,
|
||||||
\`code\` varchar(24) NOT NULL,
|
\`code\` varchar(24) NOT NULL,
|
||||||
\`createdAt\` datetime NOT NULL,
|
\`createdAt\` datetime NOT NULL,
|
||||||
|
\`deletedAt\` datetime DEFAULT NULL,
|
||||||
\`validUntil\` datetime NOT NULL,
|
\`validUntil\` datetime NOT NULL,
|
||||||
\`showEmail\` boolean NOT NULL DEFAULT false,
|
\`showEmail\` boolean NOT NULL DEFAULT false,
|
||||||
\`redeemedAt\` datetime,
|
\`redeemedAt\` datetime,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user