26 lines
697 B
TypeScript
26 lines
697 B
TypeScript
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn } from 'typeorm';
|
|
|
|
@Entity('configs')
|
|
export class Config {
|
|
@PrimaryGeneratedColumn('increment')
|
|
id: number;
|
|
|
|
@Column({ type: 'varchar', length: 100, unique: true, name: 'config_key' })
|
|
configKey: string;
|
|
|
|
@Column({ type: 'text', name: 'config_value' })
|
|
configValue: string;
|
|
|
|
@Column({ type: 'varchar', length: 50, name: 'config_type' })
|
|
configType: string;
|
|
|
|
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
description: string;
|
|
|
|
@CreateDateColumn({ name: 'created_at' })
|
|
createdAt: Date;
|
|
|
|
@UpdateDateColumn({ name: 'updated_at' })
|
|
updatedAt: Date;
|
|
}
|