Skip to content

Commit

Permalink
Update db entities for farms
Browse files Browse the repository at this point in the history
  • Loading branch information
peroxy committed Nov 17, 2023
1 parent 5620bd8 commit 5df4480
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
3 changes: 0 additions & 3 deletions packages/hubble-db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
"url": "https://github.com/hubbleprotocol/hubble-common/issues"
},
"homepage": "https://github.com/hubbleprotocol/hubble-common/blob/master/packages/hubble-db",
"peerDependencies": {
"decimal.js": "^10.3.1"
},
"publishConfig": {
"access": "public"
}
Expand Down
9 changes: 9 additions & 0 deletions packages/hubble-db/src/models/FarmRewardEntity.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export interface FarmRewardEntity {
id: BigInt;
raw_json: string;
created_on: Date;
farm_state_id: BigInt;
token_mint_id: number;
}

export default FarmRewardEntity;
4 changes: 1 addition & 3 deletions packages/hubble-db/src/models/FarmStateEntity.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import Decimal from 'decimal.js';

export interface FarmStateEntity {
id: Decimal;
id: BigInt;
raw_json: string;
created_on: Date;
farm_id: number;
Expand Down
4 changes: 1 addition & 3 deletions packages/hubble-db/src/models/FarmUserStateEntity.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import Decimal from 'decimal.js';

export interface FarmUserStateEntity {
id: Decimal;
id: BigInt;
raw_json: string;
created_on: Date;
owner_id: number;
Expand Down
2 changes: 2 additions & 0 deletions packages/hubble-db/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export * from './FarmEntity';
export * from './FarmStateEntity';
export * from './FarmUserEntity';
export * from './FarmUserStateEntity';
export * from './FarmRewardEntity';

export const CLUSTER_TABLE: string = 'cluster';
export const COLLATERAL_TABLE: string = 'collateral';
Expand Down Expand Up @@ -96,4 +97,5 @@ export const FARM_TABLE = 'farm';
export const FARM_STATE_TABLE = 'farm_state';
export const FARM_USER_TABLE = 'farm_user';
export const FARM_USER_STATE_TABLE = 'farm_user_state';
export const FARM_REWARD_TABLE = 'farm_reward';
export const API_SCHEMA: string = 'api';

0 comments on commit 5df4480

Please sign in to comment.