-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathapplication-settings.ts
More file actions
34 lines (32 loc) · 971 Bytes
/
application-settings.ts
File metadata and controls
34 lines (32 loc) · 971 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { Type } from "class-transformer";
import {
Column,
Entity,
JoinColumn,
OneToOne,
PrimaryGeneratedColumn,
} from "typeorm";
import { FormSettings } from "./form-settings";
// TODO all other settings are part of the settings table, whereas ApplicationSettings
// is a separate table. Move into settings table just like EmailSettings.
@Entity()
export class ApplicationSettings {
@PrimaryGeneratedColumn()
public readonly id!: number;
@Type(() => FormSettings)
@OneToOne(() => FormSettings, { cascade: true, eager: true })
@JoinColumn()
public profileForm!: FormSettings;
@Type(() => FormSettings)
@OneToOne(() => FormSettings, { cascade: true, eager: true })
@JoinColumn()
public confirmationForm!: FormSettings;
@Column()
public allowProfileFormFrom!: Date;
@Column()
public allowProfileFormUntil!: Date;
@Column()
public hoursToConfirm!: number;
@Column({ default: false })
public allowRatingProjects!: boolean;
}