mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +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)
|
@Field(() => String)
|
||||||
memo: string
|
memo: string
|
||||||
|
|
||||||
|
@Field(() => String)
|
||||||
|
code: string
|
||||||
|
|
||||||
@Field(() => Date)
|
@Field(() => Date)
|
||||||
createdAt: Date
|
createdAt: Date
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { BaseEntity, Entity, PrimaryGeneratedColumn, Column } from 'typeorm'
|
|||||||
import { DecimalTransformer } from '../../src/typeorm/DecimalTransformer'
|
import { DecimalTransformer } from '../../src/typeorm/DecimalTransformer'
|
||||||
|
|
||||||
@Entity('transaction_links')
|
@Entity('transaction_links')
|
||||||
export class Transaction extends BaseEntity {
|
export class TransactionLink extends BaseEntity {
|
||||||
@PrimaryGeneratedColumn('increment', { unsigned: true })
|
@PrimaryGeneratedColumn('increment', { unsigned: true })
|
||||||
id: number
|
id: number
|
||||||
|
|
||||||
@ -22,6 +22,9 @@ export class Transaction extends BaseEntity {
|
|||||||
@Column({ length: 255, nullable: false, collation: 'utf8mb4_unicode_ci' })
|
@Column({ length: 255, nullable: false, collation: 'utf8mb4_unicode_ci' })
|
||||||
memo: string
|
memo: string
|
||||||
|
|
||||||
|
@Column({ length: 96, nullable: false, collation: 'utf8mb4_unicode_ci' })
|
||||||
|
code: string
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
type: 'datetime',
|
type: 'datetime',
|
||||||
default: () => 'CURRENT_TIMESTAMP',
|
default: () => 'CURRENT_TIMESTAMP',
|
||||||
|
|||||||
@ -10,6 +10,7 @@ export async function upgrade(queryFn: (query: string, values?: any[]) => Promis
|
|||||||
\`userId\` int UNSIGNED NOT NULL,
|
\`userId\` int UNSIGNED NOT NULL,
|
||||||
\`amount\` DECIMAL(40,20) NOT NULL,
|
\`amount\` DECIMAL(40,20) NOT NULL,
|
||||||
\`memo\` varchar(255) NOT NULL,
|
\`memo\` varchar(255) NOT NULL,
|
||||||
|
\`code\` varchar(96) NOT NULL,
|
||||||
\`createdAt\` datetime NOT NULL,
|
\`createdAt\` datetime NOT NULL,
|
||||||
\`validUntil\` datetime NOT NULL,
|
\`validUntil\` datetime NOT NULL,
|
||||||
\`showEmail\` boolean NOT NULL DEFAULT false,
|
\`showEmail\` boolean NOT NULL DEFAULT false,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user