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;
}
