import { Column, Entity, PrimaryGeneratedColumn, Unique } from 'typeorm';
import { Timestamp } from './timestamp';

@Entity('configs')
export class Config extends Timestamp {
  @PrimaryGeneratedColumn('increment')
  id: number;

  @Column({ unique: true })
  key_name: string;

  @Column({ nullable: true, default: true })
  value: string | null;

  @Column()
  type: 'string' | 'number';
}
