GroundControl/src/entity/TokenToHash.ts
Overtorment 6e32b61bb7 init
2020-07-12 22:08:18 +01:00

22 lines
390 B
TypeScript

import {Entity, PrimaryGeneratedColumn, Column, Index} from "typeorm";
@Entity()
@Index(["token", "hash"], { unique: true })
export class TokenToHash {
@PrimaryGeneratedColumn()
id: number;
@Column()
token: string;
@Column()
os: string;
@Column()
hash: string;
@Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP'})
created: Date;
}