File tree Expand file tree Collapse file tree
packages/backend/src/subscription/entities Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { Entity , PrimaryGeneratedColumn } from 'typeorm' ;
1+ import { Column , Entity , PrimaryGeneratedColumn } from 'typeorm' ;
22
33@Entity ( 'subscription' )
44export default class SubscriptionEntity {
55 @PrimaryGeneratedColumn ( )
6- id : string ;
6+ id : number ;
7+
8+ @Column ( { type : 'varchar' , length : 42 } ) // Ethereum address
9+ subscriber : string ;
10+
11+ @Column ( { type : 'varchar' , length : 42 } ) // ERC20 token address
12+ token : string ;
13+
14+ @Column ( { type : 'decimal' , precision : 78 , scale : 0 } ) // BigNumber safe
15+ amount : string ;
16+
17+ @Column ( { type : 'bigint' } )
18+ nextPaymentTime : string ; // unix timestamp
19+
20+ @Column ( { type : 'bigint' } )
21+ interval : string ; // seconds
22+
23+ @Column ( { type : 'int' } )
24+ poolId : number ;
25+
26+ @Column ( { type : 'smallint' , unsigned : true } )
27+ remainingDuration : number ;
28+
29+ @Column ( { type : 'boolean' , default : true } )
30+ active : boolean ;
31+
32+ @Column ( { type : 'bigint' , nullable : true } )
33+ expiredAt : string | null ;
734}
You can’t perform that action at this time.
0 commit comments