import {
  Entity,
  Column,
  PrimaryColumn,
  CreateDateColumn,
  UpdateDateColumn,
} from 'typeorm';

@Entity('meta_pages')
export class MetaPage {
  @PrimaryColumn({ length: 768 })
  slug: string;

  @Column({ nullable: true, type: 'text' })
  title: string;

  @Column({ nullable: true, type: 'text' })
  description: string;

  @Column({ nullable: true, type: 'text' })
  image: string;

  @Column({ name: 'schema_json', nullable: true, type: 'longtext' })
  schemaJson: string;

  @CreateDateColumn({ name: 'created_at' })
  createdAt: Date;

  @UpdateDateColumn({ name: 'updated_at' })
  updatedAt: Date;
}
