forked from nervosnetwork/force-bridge
/
CkbMint.ts
45 lines (32 loc) · 828 Bytes
/
CkbMint.ts
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
import { Entity, Column, PrimaryColumn, CreateDateColumn, UpdateDateColumn, Index } from 'typeorm';
export type dbTxStatus = 'todo' | 'pending' | 'success' | 'error';
export type CkbMintStatus = dbTxStatus;
@Entity()
export class CkbMint {
@PrimaryColumn()
id: string;
@Column()
chain: number;
@Column()
asset: string;
@Column()
amount: string;
@Column()
recipientLockscript: string;
// todo: save address when save lockscript
// @Column()
// recipientAddress: string;
@Column({ default: '' })
sudtExtraData: string;
@Column({ default: 'todo' })
status: CkbMintStatus;
@Index()
@Column({ nullable: true })
mintHash: string;
@Column({ type: 'text', nullable: true })
message: string;
@CreateDateColumn()
createdAt: string;
@UpdateDateColumn()
updatedAt: string;
}