import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';

@Entity('online_snapshots')
export class OnlineSnapshot {
  @PrimaryGeneratedColumn({ type: 'bigint' })
  id: string;

  @Column({ type: 'timestamptz', unique: true })
  ts: Date;

  @Column({ name: 'online_count', type: 'int', default: 0 })
  onlineCount: number;

  @Column({ name: 'window_seconds', type: 'int', default: 180 })
  windowSeconds: number;
}
