27
									
								
								src/models/entities/ConfigFlags.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								src/models/entities/ConfigFlags.ts
									
									
									
									
									
										Normal 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; | ||||
| } | ||||
		Reference in New Issue
	
	Block a user