-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now tracking own shares trading by subjects and making all time stats. renamed: db/migrations/1693492520799-Data.js -> db/migrations/1693771301483-Data.js modified: schema.graphql new file: src/model/generated/allTimeStats.model.ts modified: src/model/generated/index.ts modified: src/model/generated/subject.model.ts
- Loading branch information
1 parent
254c459
commit 32f38e3
Showing
5 changed files
with
90 additions
and
3 deletions.
There are no files selected for viewing
8 changes: 5 additions & 3 deletions
8
db/migrations/1693492520799-Data.js → db/migrations/1693771301483-Data.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import {Entity as Entity_, Column as Column_, PrimaryColumn as PrimaryColumn_} from "typeorm" | ||
import * as marshal from "./marshal" | ||
|
||
@Entity_() | ||
export class AllTimeStats { | ||
constructor(props?: Partial<AllTimeStats>) { | ||
Object.assign(this, props) | ||
} | ||
|
||
@PrimaryColumn_() | ||
id!: string | ||
|
||
@Column_("int4", {nullable: false}) | ||
trades!: number | ||
|
||
@Column_("int4", {nullable: false}) | ||
numSubjects!: number | ||
|
||
@Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false}) | ||
ethVolume!: bigint | ||
|
||
@Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false}) | ||
ethBuyVolume!: bigint | ||
|
||
@Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false}) | ||
ethSellVolume!: bigint | ||
|
||
@Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false}) | ||
shareVolume!: bigint | ||
|
||
@Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false}) | ||
shareBuyVolume!: bigint | ||
|
||
@Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false}) | ||
shareSellVolume!: bigint | ||
|
||
@Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false}) | ||
subjectEthTotal!: bigint | ||
|
||
@Column_("numeric", {transformer: marshal.bigintTransformer, nullable: false}) | ||
protocolEthTotal!: bigint | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from "./trade.model" | ||
export * from "./subject.model" | ||
export * from "./blockStats.model" | ||
export * from "./allTimeStats.model" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters