forked from StellarSplit/StellarSplit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreports.entity.ts
More file actions
50 lines (38 loc) · 973 Bytes
/
Copy pathreports.entity.ts
File metadata and controls
50 lines (38 loc) · 973 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import {
Entity,
PrimaryGeneratedColumn,
Column,
CreateDateColumn,
UpdateDateColumn,
} from "typeorm";
export type ReportStatus =
| "pending"
| "processing"
| "completed"
| "failed"
| "deleted";
@Entity("analytics_reports")
export class AnalyticsReport {
@PrimaryGeneratedColumn("uuid")
id!: string;
@Column({ type: "varchar", nullable: true })
userId?: string;
@Column({ type: "varchar" })
type!: string;
@Column({ type: "jsonb", default: {} })
params!: Record<string, any>;
@Column({ type: "varchar", default: "pending" })
status!: ReportStatus;
@Column({ type: "varchar", nullable: true })
filePath?: string;
@Column({ type: "varchar", nullable: true })
fileName?: string;
@Column({ type: "text", nullable: true })
error?: string;
@CreateDateColumn()
createdAt!: Date;
@UpdateDateColumn()
updatedAt!: Date;
@Column({ type: "timestamp", name: "deleted_at", nullable: true })
deletedAt?: Date;
}