mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
add type definitions, make code required (not null)
This commit is contained in:
parent
83c8f9731e
commit
795d339398
@ -47,6 +47,7 @@ export class ContributionLink extends BaseEntity {
|
||||
|
||||
@Column({
|
||||
name: 'total_max_count_of_contribution',
|
||||
type: 'int',
|
||||
unsigned: true,
|
||||
nullable: true,
|
||||
default: null,
|
||||
@ -66,6 +67,7 @@ export class ContributionLink extends BaseEntity {
|
||||
|
||||
@Column({
|
||||
name: 'min_gap_hours',
|
||||
type: 'int',
|
||||
unsigned: true,
|
||||
nullable: true,
|
||||
default: null,
|
||||
@ -75,11 +77,11 @@ export class ContributionLink extends BaseEntity {
|
||||
@Column({ name: 'created_at', type: 'datetime', default: () => 'CURRENT_TIMESTAMP' })
|
||||
createdAt: Date
|
||||
|
||||
@DeleteDateColumn()
|
||||
@DeleteDateColumn({ name: 'deleted_at' })
|
||||
deletedAt: Date | null
|
||||
|
||||
@Column({ length: 24, nullable: true, collation: 'utf8mb4_unicode_ci' })
|
||||
code: string | null
|
||||
@Column({ length: 24, nullable: false, collation: 'utf8mb4_unicode_ci' })
|
||||
code: string
|
||||
|
||||
@Column({ name: 'link_enabled', type: 'boolean', default: true })
|
||||
linkEnabled: boolean
|
||||
|
||||
@ -23,7 +23,7 @@ export async function upgrade(queryFn: (query: string, values?: any[]) => Promis
|
||||
\`min_gap_hours\` int(10) unsigned NULL DEFAULT NULL,
|
||||
\`created_at\` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
\`deleted_at\` datetime NULL DEFAULT NULL,
|
||||
\`code\` varchar(24) COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
|
||||
\`code\` varchar(24) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
\`link_enabled\` tinyint(4) NOT NULL DEFAULT '1',
|
||||
PRIMARY KEY (\`id\`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;`)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user