Skip to content

Commit

Permalink
Add klend leverage metrics entity
Browse files Browse the repository at this point in the history
  • Loading branch information
peroxy committed Dec 29, 2023
1 parent 07193d6 commit fdea249
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/hubble-db/src/models/KlendLeverageMetricsEntity.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export type KlendLeverageMetricsEntity = {
id: BigInt;
metrics_source_id: number;
deposit_reserve_id: number;
borrow_reserve_id: number;
metrics: string;
created_on: Date;
updated_on: Date;
};

export default KlendLeverageMetricsEntity;
4 changes: 4 additions & 0 deletions packages/hubble-db/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export * from './FarmStateEntity';
export * from './FarmUserEntity';
export * from './FarmUserStateEntity';
export * from './FarmRewardEntity';
export * from './KlendLeverageMetricsEntity';

export const CLUSTER_TABLE: string = 'cluster';
export const COLLATERAL_TABLE: string = 'collateral';
Expand Down Expand Up @@ -98,6 +99,8 @@ 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_state';
export const KLEND_LEVERAGE_METRICS_TABLE = 'klend_leverage_metrics';

export type RESAMPLE_FREQUENCY = 'hour' | 'day';
export const HOURLY_FREQUENCY = 'hour';
export const DAILY_FREQUENCY = 'day';
Expand All @@ -107,4 +110,5 @@ export const GET_OBLIGATION_STATE_RESAMPLED_TABLE = (frequency: RESAMPLE_FREQUEN
}
return `klend_obligation_state_resampled_${frequency}`;
};

export const API_SCHEMA: string = 'api';

0 comments on commit fdea249

Please sign in to comment.