forked from StellarSplit/StellarSplit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsplit-archive.entity.ts
More file actions
38 lines (29 loc) · 780 Bytes
/
Copy pathsplit-archive.entity.ts
File metadata and controls
38 lines (29 loc) · 780 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
import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn } from 'typeorm';
export enum ArchiveReason {
COMPLETED = 'completed',
EXPIRED = 'expired',
MANUALLY_ARCHIVED = 'manually_archived',
CANCELLED = 'cancelled',
}
@Entity('split_archives')
export class SplitArchive {
@PrimaryGeneratedColumn('uuid')
id!: string;
@Column({ type: 'uuid' })
originalSplitId!: string;
@Column({ type: 'jsonb' })
splitData!: any;
@Column({ type: 'jsonb' })
participantData!: any[];
@Column({ type: 'jsonb' })
paymentData!: any[];
@Column({
type: 'enum',
enum: ArchiveReason,
})
archiveReason!: ArchiveReason;
@CreateDateColumn()
archivedAt!: Date;
@Column({ type: 'varchar' })
archivedBy!: string; // wallet address or "system"
}