From fdea249c438c8fe86f4db49ba316f2bc54525939 Mon Sep 17 00:00:00 2001 From: peroxy Date: Fri, 29 Dec 2023 11:39:20 +0100 Subject: [PATCH] Add klend leverage metrics entity --- .../src/models/KlendLeverageMetricsEntity.ts | 11 +++++++++++ packages/hubble-db/src/models/index.ts | 4 ++++ 2 files changed, 15 insertions(+) create mode 100644 packages/hubble-db/src/models/KlendLeverageMetricsEntity.ts diff --git a/packages/hubble-db/src/models/KlendLeverageMetricsEntity.ts b/packages/hubble-db/src/models/KlendLeverageMetricsEntity.ts new file mode 100644 index 00000000..b799753f --- /dev/null +++ b/packages/hubble-db/src/models/KlendLeverageMetricsEntity.ts @@ -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; diff --git a/packages/hubble-db/src/models/index.ts b/packages/hubble-db/src/models/index.ts index 90e287c7..8bb0ed2d 100644 --- a/packages/hubble-db/src/models/index.ts +++ b/packages/hubble-db/src/models/index.ts @@ -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'; @@ -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'; @@ -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';