mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 09:05:06 -07:00
35 lines
719 B
TypeScript
35 lines
719 B
TypeScript
import { Column, Entity, Index, PrimaryColumn } from 'typeorm';
|
|
|
|
import { DateTimeTransformer } from '../utils/DateTimeTransformer';
|
|
import { TrackedEntity } from '../utils/TrackedEntity.entity';
|
|
|
|
@Entity()
|
|
export class ClientStatisticsEntity extends TrackedEntity {
|
|
|
|
@PrimaryColumn({ length: 64, type: 'varchar' })
|
|
submissionHash: string;
|
|
|
|
@Column({ length: 62, type: 'varchar' })
|
|
address: string;
|
|
|
|
@Column()
|
|
clientName: string;
|
|
|
|
@Index()
|
|
@Column({ length: 8, type: 'varchar' })
|
|
sessionId: string;
|
|
|
|
@Index()
|
|
@Column({
|
|
type: 'datetime',
|
|
transformer: new DateTimeTransformer()
|
|
})
|
|
time: Date;
|
|
|
|
@Column({ type: 'real' })
|
|
difficulty: number;
|
|
|
|
|
|
|
|
|
|
} |