Added key-value like db table for config flags

ref #110
This commit is contained in:
Nicolai Ort 2021-01-20 17:58:28 +01:00
parent 2db6510a8a
commit b15967ff31

View File

@ -0,0 +1,27 @@
import {
IsNotEmpty,
IsString
} from "class-validator";
import { Column, Entity, PrimaryColumn } from "typeorm";
/**
* Defines the ConfigFlag entity.
* This entity can be used to set some flags on db init.
*/
@Entity()
export class ConfigFlag {
/**
* The flag's name (primary).
*/
@PrimaryColumn()
@IsString()
option: string;
/**
* The flag's value.
*/
@Column()
@IsString()
@IsNotEmpty()
value: string;
}