mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-12 23:35:50 +00:00
add code column to model and entity
This commit is contained in:
parent
19084d7514
commit
eb5b19e6d6
@ -16,6 +16,9 @@ export class TransactionLink {
|
||||
@Field(() => String)
|
||||
memo: string
|
||||
|
||||
@Field(() => String)
|
||||
code: string
|
||||
|
||||
@Field(() => Date)
|
||||
createdAt: Date
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ import { BaseEntity, Entity, PrimaryGeneratedColumn, Column } from 'typeorm'
|
||||
import { DecimalTransformer } from '../../src/typeorm/DecimalTransformer'
|
||||
|
||||
@Entity('transaction_links')
|
||||
export class Transaction extends BaseEntity {
|
||||
export class TransactionLink extends BaseEntity {
|
||||
@PrimaryGeneratedColumn('increment', { unsigned: true })
|
||||
id: number
|
||||
|
||||
@ -22,6 +22,9 @@ export class Transaction extends BaseEntity {
|
||||
@Column({ length: 255, nullable: false, collation: 'utf8mb4_unicode_ci' })
|
||||
memo: string
|
||||
|
||||
@Column({ length: 96, nullable: false, collation: 'utf8mb4_unicode_ci' })
|
||||
code: string
|
||||
|
||||
@Column({
|
||||
type: 'datetime',
|
||||
default: () => 'CURRENT_TIMESTAMP',
|
||||
|
||||
@ -10,6 +10,7 @@ export async function upgrade(queryFn: (query: string, values?: any[]) => Promis
|
||||
\`userId\` int UNSIGNED NOT NULL,
|
||||
\`amount\` DECIMAL(40,20) NOT NULL,
|
||||
\`memo\` varchar(255) NOT NULL,
|
||||
\`code\` varchar(96) NOT NULL,
|
||||
\`createdAt\` datetime NOT NULL,
|
||||
\`validUntil\` datetime NOT NULL,
|
||||
\`showEmail\` boolean NOT NULL DEFAULT false,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user