import {
  Column,
  CreateDateColumn,
  Entity,
  JoinColumn,
  JoinTable,
  ManyToMany,
  ManyToOne,
  OneToMany,
  OneToOne,
  PrimaryGeneratedColumn,
  UpdateDateColumn,
} from 'typeorm';
import { TranslationEntity } from 'typeorm-translatable';
import { Menu } from './menu.entity';

@Entity()
export class MenuTranslation extends TranslationEntity<Menu> {
  @Column({ unique: false, default: '', length: 200 })
  title?: string;

  @Column({ default: '' })
  description?: string;

  @ManyToOne(() => Menu, (menu) => menu.translations, {
    onDelete: 'CASCADE',
    createForeignKeyConstraints: false,
  })
  source?: Menu | undefined;
}
