import { Column, Entity } from 'typeorm'; import { RawScrapedEntity } from '@/entities/abstract'; import { RetailerKind } from '@/types'; import { RawRetailerDataV1 } from './types'; @Entity({ name: 'raw_retailer_product' }) export default class RawRetailerProduct extends RawScrapedEntity { @Column({ type: 'enum', enum: RetailerKind, // @TODO: rename column to retailer? name: 'kind', nullable: false, }) retailer!: RetailerKind; @Column({ type: 'jsonb', nullable: false }) rawData!: RawRetailerDataV1; }