forked from StellarSplit/StellarSplit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettlement-step.entity.ts
More file actions
44 lines (32 loc) · 966 Bytes
/
Copy pathsettlement-step.entity.ts
File metadata and controls
44 lines (32 loc) · 966 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
import { Entity, PrimaryGeneratedColumn, Column, ManyToOne } from "typeorm";
import { SettlementSuggestion } from "./settlement-suggestions.entity";
export enum StepStatus {
PENDING = "pending",
COMPLETED = "completed",
SKIPPED = "skipped",
}
@Entity("settlement_steps")
export class SettlementStep {
@PrimaryGeneratedColumn("uuid")
id!: string;
@Column()
suggestionId!: string;
@ManyToOne(() => SettlementSuggestion, (suggestion) => suggestion.steps)
suggestion!: SettlementSuggestion;
@Column()
stepOrder!: number;
@Column()
fromAddress!: string;
@Column()
toAddress!: string;
@Column({ type: "decimal", precision: 15, scale: 7 })
amount!: number;
@Column()
assetCode!: string;
@Column({ type: "jsonb" })
relatedSplitIds!: string[];
@Column({ type: "text" })
stellarPaymentUri!: string; // SEP-0007 format
@Column({ type: "enum", enum: StepStatus, default: StepStatus.PENDING })
status!: StepStatus;
}