Files
HIPCTF2/backend/src/database/entities/category.entity.ts
T

23 lines
520 B
TypeScript

import { Entity, PrimaryColumn, Column, Index } from 'typeorm';
@Entity('category')
export class CategoryEntity {
@PrimaryColumn('text')
id!: string;
@Index({ unique: true, where: 'system_key IS NOT NULL' })
@Column('text', { name: 'system_key', nullable: true })
systemKey!: string | null;
@Column('text')
name!: string;
@Column('text')
abbreviation!: string;
@Column('text', { default: '' })
description!: string;
@Column('text', { name: 'icon_path', default: '' })
iconPath!: string;
}