import { Column, Entity, PrimaryGeneratedColumn, Unique } from 'typeorm';
import { Timestamp } from './timestamp';

@Entity('out-bid-logs')
@Unique(['model', 'out_price'])
export class OutBidLog extends Timestamp {
  @PrimaryGeneratedColumn('increment')
  id: number;

  @Column({ default: null, nullable: true })
  model: string | null;

  @Column({ default: null, nullable: true })
  lot_id: string;

  @Column()
  out_price: number;

  @Column({ default: null, nullable: true, type: 'text' })
  raw_data: string;
}
