35 lines
633 B
TypeScript
35 lines
633 B
TypeScript
import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
|
|
|
|
@Entity('words')
|
|
export class Word {
|
|
@PrimaryGeneratedColumn()
|
|
id: number;
|
|
|
|
@Column()
|
|
english: string;
|
|
|
|
@Column()
|
|
korean: string;
|
|
|
|
@Column({ nullable: true })
|
|
pronunciation: string;
|
|
|
|
@Column({ default: 'general' })
|
|
category: string;
|
|
|
|
@Column({ default: 'beginner' })
|
|
difficulty: string;
|
|
|
|
@Column({ nullable: true, type: 'text' })
|
|
example_en: string;
|
|
|
|
@Column({ nullable: true, type: 'text' })
|
|
example_ko: string;
|
|
|
|
@Column({ default: false })
|
|
is_daily: boolean;
|
|
|
|
@Column({ type: 'date', nullable: true })
|
|
daily_date: string;
|
|
}
|