mirror of
https://github.com/benjamin-wilson/public-pool.git
synced 2026-09-29 09:05:06 -07:00
41 lines
932 B
TypeScript
41 lines
932 B
TypeScript
import { Column, Entity } from 'typeorm';
|
|
|
|
import { PayoutMode } from '../../types/payout-mode';
|
|
import { PrimaryGeneratedBigIntColumn } from '../utils/PrimaryGeneratedBigIntColumn';
|
|
import { TrackedEntity } from '../utils/TrackedEntity.entity';
|
|
|
|
@Entity()
|
|
export class BlocksEntity extends TrackedEntity {
|
|
|
|
@PrimaryGeneratedBigIntColumn()
|
|
id: number;
|
|
|
|
@Column()
|
|
height: number;
|
|
|
|
@Column({ length: 62, type: 'varchar' })
|
|
minerAddress: string;
|
|
|
|
@Column()
|
|
worker: string;
|
|
|
|
@Column({ length: 16, type: 'varchar', default: 'solo' })
|
|
payoutMode: PayoutMode;
|
|
|
|
@Column({ length: 8, type: 'varchar' })
|
|
sessionId: string;
|
|
|
|
@Column()
|
|
blockData: string;
|
|
|
|
@Column({ nullable: true })
|
|
blockHash?: string;
|
|
|
|
@Column({ type: 'varchar', nullable: true })
|
|
blockSubmissionResult?: string;
|
|
|
|
@Column({ type: 'bigint', nullable: true })
|
|
payoutSnapshotId?: string | null;
|
|
|
|
}
|