mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 09:05:06 -07:00
36 lines
737 B
TypeScript
36 lines
737 B
TypeScript
import { Column, Entity, Index, PrimaryColumn } from 'typeorm';
|
|
|
|
import { TrackedEntity } from '../utils/TrackedEntity.entity';
|
|
|
|
@Entity()
|
|
//Index for the heartbeat update
|
|
@Index(["address", "clientName", "sessionId", "time"])
|
|
export class ClientStatisticsEntity extends TrackedEntity {
|
|
|
|
@PrimaryColumn({ length: 64, type: 'varchar' })
|
|
submissionHash: string;
|
|
|
|
|
|
@Column({ length: 62, type: 'varchar' })
|
|
address: string;
|
|
|
|
@Column()
|
|
clientName: string;
|
|
|
|
@Column({ length: 8, type: 'varchar' })
|
|
sessionId: string;
|
|
|
|
@Index()
|
|
@Column({ type: 'integer' })
|
|
time: number;
|
|
|
|
@Column({ type: 'real' })
|
|
shares: number;
|
|
|
|
@Column({ default: 0, type: 'integer' })
|
|
acceptedCount: number;
|
|
|
|
|
|
|
|
|
|
} |