@dhedge/backend-flatcoin-core 0.1.4 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,26 @@
1
+ // src/utils/column.numeric.transformer.ts
2
+ import { BigNumber } from "ethers";
3
+ var ColumnNumericTransformer = class {
4
+ to(data) {
5
+ return data;
6
+ }
7
+ from(data) {
8
+ return parseFloat(data);
9
+ }
10
+ };
11
+ var numericTransformer = new ColumnNumericTransformer();
12
+ var ColumnBigNumberTransformer = class {
13
+ to(data) {
14
+ return data == null ? void 0 : data.toBigInt();
15
+ }
16
+ from(data) {
17
+ return data ? BigNumber.from(data) : null;
18
+ }
19
+ };
20
+ var bigNumberTransformer = new ColumnBigNumberTransformer();
21
+
22
+ export {
23
+ numericTransformer,
24
+ bigNumberTransformer
25
+ };
26
+ //# sourceMappingURL=chunk-DSJHHCBP.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/utils/column.numeric.transformer.ts"],"sourcesContent":["import { BigNumber } from 'ethers';\n\nclass ColumnNumericTransformer {\n to(data: number): number {\n return data;\n }\n\n from(data: string): number {\n return parseFloat(data);\n }\n}\n\nexport const numericTransformer = new ColumnNumericTransformer();\n\nclass ColumnBigNumberTransformer {\n to(data?: BigNumber): bigint | undefined {\n return data?.toBigInt();\n }\n\n from(data?: bigint): BigNumber | null {\n return data ? BigNumber.from(data) : null;\n }\n}\n\nexport const bigNumberTransformer = new ColumnBigNumberTransformer();\n"],"mappings":";AAAA,SAAS,iBAAiB;AAE1B,IAAM,2BAAN,MAA+B;AAAA,EAC7B,GAAG,MAAsB;AACvB,WAAO;AAAA,EACT;AAAA,EAEA,KAAK,MAAsB;AACzB,WAAO,WAAW,IAAI;AAAA,EACxB;AACF;AAEO,IAAM,qBAAqB,IAAI,yBAAyB;AAE/D,IAAM,6BAAN,MAAiC;AAAA,EAC/B,GAAG,MAAsC;AACvC,WAAO,6BAAM;AAAA,EACf;AAAA,EAEA,KAAK,MAAiC;AACpC,WAAO,OAAO,UAAU,KAAK,IAAI,IAAI;AAAA,EACvC;AACF;AAEO,IAAM,uBAAuB,IAAI,2BAA2B;","names":[]}
@@ -0,0 +1,21 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __commonJS = (cb, mod) => function __require() {
5
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
6
+ };
7
+ var __decorateClass = (decorators, target, key, kind) => {
8
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
9
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
10
+ if (decorator = decorators[i])
11
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
12
+ if (kind && result)
13
+ __defProp(target, key, result);
14
+ return result;
15
+ };
16
+
17
+ export {
18
+ __commonJS,
19
+ __decorateClass
20
+ };
21
+ //# sourceMappingURL=chunk-S2FWJ7OG.mjs.map
@@ -1,3 +1,10 @@
1
+ declare class Apy {
2
+ id: number;
3
+ monthly: number;
4
+ weekly: number;
5
+ daily: number;
6
+ }
7
+
1
8
  declare abstract class FlatcoinPriceParent {
2
9
  id: number;
3
10
  priceUsd: string;
@@ -21,4 +28,4 @@ declare class FlatcoinPriceOneYear extends FlatcoinPriceParent {
21
28
  declare class FlatcoinPrice extends FlatcoinPriceParent {
22
29
  }
23
30
 
24
- export { FlatcoinPrice, FlatcoinPriceOneDay, FlatcoinPriceOneMonth, FlatcoinPriceOneWeek, FlatcoinPriceOneYear, FlatcoinPriceParent };
31
+ export { Apy, FlatcoinPrice, FlatcoinPriceOneDay, FlatcoinPriceOneMonth, FlatcoinPriceOneWeek, FlatcoinPriceOneYear, FlatcoinPriceParent };
@@ -0,0 +1,111 @@
1
+ import {
2
+ numericTransformer
3
+ } from "../chunk-DSJHHCBP.mjs";
4
+ import {
5
+ __decorateClass
6
+ } from "../chunk-S2FWJ7OG.mjs";
7
+
8
+ // src/entity/apy.ts
9
+ import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";
10
+ import { Field, Float, ObjectType } from "@nestjs/graphql";
11
+ var Apy = class {
12
+ };
13
+ __decorateClass([
14
+ PrimaryGeneratedColumn({ name: "id" })
15
+ ], Apy.prototype, "id", 2);
16
+ __decorateClass([
17
+ Field(() => Float, { nullable: false }),
18
+ Column({ name: "monthly", type: "decimal", precision: 30, scale: 2, transformer: numericTransformer })
19
+ ], Apy.prototype, "monthly", 2);
20
+ __decorateClass([
21
+ Field(() => Float, { nullable: false }),
22
+ Column({ name: "weekly", type: "decimal", precision: 30, scale: 2, transformer: numericTransformer })
23
+ ], Apy.prototype, "weekly", 2);
24
+ __decorateClass([
25
+ Field(() => Float, { nullable: false }),
26
+ Column({ name: "daily", type: "decimal", precision: 30, scale: 2, transformer: numericTransformer })
27
+ ], Apy.prototype, "daily", 2);
28
+ Apy = __decorateClass([
29
+ ObjectType(),
30
+ Entity({ name: "apy" })
31
+ ], Apy);
32
+
33
+ // src/entity/flatcoin.price.one.day.ts
34
+ import { Entity as Entity3 } from "typeorm";
35
+
36
+ // src/entity/flatcoin.price.parent.ts
37
+ import { Entity as Entity2, PrimaryGeneratedColumn as PrimaryGeneratedColumn2, Column as Column2 } from "typeorm";
38
+ import { Field as Field2, ObjectType as ObjectType2 } from "@nestjs/graphql";
39
+ var FlatcoinPriceParent = class {
40
+ };
41
+ __decorateClass([
42
+ PrimaryGeneratedColumn2({ name: "id" })
43
+ ], FlatcoinPriceParent.prototype, "id", 2);
44
+ __decorateClass([
45
+ Field2(),
46
+ Column2({ name: "price_usd", type: "numeric", precision: 30 })
47
+ ], FlatcoinPriceParent.prototype, "priceUsd", 2);
48
+ __decorateClass([
49
+ Field2(),
50
+ Column2({ name: "price_usd_formatted", type: "decimal", precision: 10, scale: 2 })
51
+ ], FlatcoinPriceParent.prototype, "priceUsdFormatted", 2);
52
+ __decorateClass([
53
+ Field2(),
54
+ Column2({ name: "timestamp", type: "numeric", precision: 25 })
55
+ ], FlatcoinPriceParent.prototype, "timestamp", 2);
56
+ __decorateClass([
57
+ Column2({ name: "block_number", type: "numeric", precision: 25 })
58
+ ], FlatcoinPriceParent.prototype, "blockNumber", 2);
59
+ FlatcoinPriceParent = __decorateClass([
60
+ ObjectType2(),
61
+ Entity2()
62
+ ], FlatcoinPriceParent);
63
+
64
+ // src/entity/flatcoin.price.one.day.ts
65
+ var FlatcoinPriceOneDay = class extends FlatcoinPriceParent {
66
+ };
67
+ FlatcoinPriceOneDay = __decorateClass([
68
+ Entity3({ name: "flatcoin_prices_1d" })
69
+ ], FlatcoinPriceOneDay);
70
+
71
+ // src/entity/flatcoin.price.one.month.ts
72
+ import { Entity as Entity4 } from "typeorm";
73
+ var FlatcoinPriceOneMonth = class extends FlatcoinPriceParent {
74
+ };
75
+ FlatcoinPriceOneMonth = __decorateClass([
76
+ Entity4({ name: "flatcoin_prices_1m" })
77
+ ], FlatcoinPriceOneMonth);
78
+
79
+ // src/entity/flatcoin.price.one.week.ts
80
+ import { Entity as Entity5 } from "typeorm";
81
+ var FlatcoinPriceOneWeek = class extends FlatcoinPriceParent {
82
+ };
83
+ FlatcoinPriceOneWeek = __decorateClass([
84
+ Entity5({ name: "flatcoin_prices_1w" })
85
+ ], FlatcoinPriceOneWeek);
86
+
87
+ // src/entity/flatcoin.price.one.year.ts
88
+ import { Entity as Entity6 } from "typeorm";
89
+ var FlatcoinPriceOneYear = class extends FlatcoinPriceParent {
90
+ };
91
+ FlatcoinPriceOneYear = __decorateClass([
92
+ Entity6({ name: "flatcoin_prices_1y" })
93
+ ], FlatcoinPriceOneYear);
94
+
95
+ // src/entity/flatcoin.price.ts
96
+ import { Entity as Entity7 } from "typeorm";
97
+ var FlatcoinPrice = class extends FlatcoinPriceParent {
98
+ };
99
+ FlatcoinPrice = __decorateClass([
100
+ Entity7({ name: "flatcoin_prices" })
101
+ ], FlatcoinPrice);
102
+ export {
103
+ Apy,
104
+ FlatcoinPrice,
105
+ FlatcoinPriceOneDay,
106
+ FlatcoinPriceOneMonth,
107
+ FlatcoinPriceOneWeek,
108
+ FlatcoinPriceOneYear,
109
+ FlatcoinPriceParent
110
+ };
111
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/entity/apy.ts","../../src/entity/flatcoin.price.one.day.ts","../../src/entity/flatcoin.price.parent.ts","../../src/entity/flatcoin.price.one.month.ts","../../src/entity/flatcoin.price.one.week.ts","../../src/entity/flatcoin.price.one.year.ts","../../src/entity/flatcoin.price.ts"],"sourcesContent":["import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';\nimport { Field, Float, ObjectType } from '@nestjs/graphql';\nimport { numericTransformer } from '../utils';\n\n@ObjectType()\n@Entity({ name: 'apy' })\nexport class Apy {\n @PrimaryGeneratedColumn({ name: 'id' })\n id: number;\n\n @Field(() => Float, { nullable: false })\n @Column({ name: 'monthly', type: 'decimal', precision: 30, scale: 2, transformer: numericTransformer })\n monthly: number;\n\n @Field(() => Float, { nullable: false })\n @Column({ name: 'weekly', type: 'decimal', precision: 30, scale: 2, transformer: numericTransformer })\n weekly: number;\n\n @Field(() => Float, { nullable: false })\n @Column({ name: 'daily', type: 'decimal', precision: 30, scale: 2, transformer: numericTransformer })\n daily: number;\n}\n","import { Entity } from 'typeorm';\nimport { FlatcoinPriceParent } from './flatcoin.price.parent';\n\n@Entity({ name: 'flatcoin_prices_1d' })\nexport class FlatcoinPriceOneDay extends FlatcoinPriceParent {}\n","import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';\nimport { Field, ObjectType } from '@nestjs/graphql';\n\n@ObjectType()\n@Entity()\nexport abstract class FlatcoinPriceParent {\n @PrimaryGeneratedColumn({ name: 'id' })\n id: number;\n\n @Field()\n @Column({ name: 'price_usd', type: 'numeric', precision: 30 })\n priceUsd: string;\n\n @Field()\n @Column({ name: 'price_usd_formatted', type: 'decimal', precision: 10, scale: 2 })\n priceUsdFormatted: number;\n\n @Field()\n @Column({ name: 'timestamp', type: 'numeric', precision: 25 })\n timestamp: number;\n\n @Column({ name: 'block_number', type: 'numeric', precision: 25 })\n blockNumber: number;\n}\n","import { Entity } from 'typeorm';\nimport { FlatcoinPriceParent } from './flatcoin.price.parent';\n\n@Entity({ name: 'flatcoin_prices_1m' })\nexport class FlatcoinPriceOneMonth extends FlatcoinPriceParent {}\n","import { Entity } from 'typeorm';\nimport { FlatcoinPriceParent } from './flatcoin.price.parent';\n\n@Entity({ name: 'flatcoin_prices_1w' })\nexport class FlatcoinPriceOneWeek extends FlatcoinPriceParent {}\n","import { Entity } from 'typeorm';\nimport { FlatcoinPriceParent } from './flatcoin.price.parent';\n\n@Entity({ name: 'flatcoin_prices_1y' })\nexport class FlatcoinPriceOneYear extends FlatcoinPriceParent {}\n","import { Entity } from 'typeorm';\nimport { FlatcoinPriceParent } from './flatcoin.price.parent';\n\n@Entity({ name: 'flatcoin_prices' })\nexport class FlatcoinPrice extends FlatcoinPriceParent {}\n"],"mappings":";;;;;;;;AAAA,SAAS,QAAQ,QAAQ,8BAA8B;AACvD,SAAS,OAAO,OAAO,kBAAkB;AAKlC,IAAM,MAAN,MAAU;AAejB;AAbE;AAAA,EADC,uBAAuB,EAAE,MAAM,KAAK,CAAC;AAAA,GAD3B,IAEX;AAIA;AAAA,EAFC,MAAM,MAAM,OAAO,EAAE,UAAU,MAAM,CAAC;AAAA,EACtC,OAAO,EAAE,MAAM,WAAW,MAAM,WAAW,WAAW,IAAI,OAAO,GAAG,aAAa,mBAAmB,CAAC;AAAA,GAL3F,IAMX;AAIA;AAAA,EAFC,MAAM,MAAM,OAAO,EAAE,UAAU,MAAM,CAAC;AAAA,EACtC,OAAO,EAAE,MAAM,UAAU,MAAM,WAAW,WAAW,IAAI,OAAO,GAAG,aAAa,mBAAmB,CAAC;AAAA,GAT1F,IAUX;AAIA;AAAA,EAFC,MAAM,MAAM,OAAO,EAAE,UAAU,MAAM,CAAC;AAAA,EACtC,OAAO,EAAE,MAAM,SAAS,MAAM,WAAW,WAAW,IAAI,OAAO,GAAG,aAAa,mBAAmB,CAAC;AAAA,GAbzF,IAcX;AAdW,MAAN;AAAA,EAFN,WAAW;AAAA,EACX,OAAO,EAAE,MAAM,MAAM,CAAC;AAAA,GACV;;;ACNb,SAAS,UAAAA,eAAc;;;ACAvB,SAAS,UAAAC,SAAQ,0BAAAC,yBAAwB,UAAAC,eAAc;AACvD,SAAS,SAAAC,QAAO,cAAAC,mBAAkB;AAI3B,IAAe,sBAAf,MAAmC;AAkB1C;AAhBE;AAAA,EADCC,wBAAuB,EAAE,MAAM,KAAK,CAAC;AAAA,GADlB,oBAEpB;AAIA;AAAA,EAFCC,OAAM;AAAA,EACNC,QAAO,EAAE,MAAM,aAAa,MAAM,WAAW,WAAW,GAAG,CAAC;AAAA,GALzC,oBAMpB;AAIA;AAAA,EAFCD,OAAM;AAAA,EACNC,QAAO,EAAE,MAAM,uBAAuB,MAAM,WAAW,WAAW,IAAI,OAAO,EAAE,CAAC;AAAA,GAT7D,oBAUpB;AAIA;AAAA,EAFCD,OAAM;AAAA,EACNC,QAAO,EAAE,MAAM,aAAa,MAAM,WAAW,WAAW,GAAG,CAAC;AAAA,GAbzC,oBAcpB;AAGA;AAAA,EADCA,QAAO,EAAE,MAAM,gBAAgB,MAAM,WAAW,WAAW,GAAG,CAAC;AAAA,GAhB5C,oBAiBpB;AAjBoB,sBAAf;AAAA,EAFNC,YAAW;AAAA,EACXC,QAAO;AAAA,GACc;;;ADDf,IAAM,sBAAN,cAAkC,oBAAoB;AAAC;AAAjD,sBAAN;AAAA,EADNC,QAAO,EAAE,MAAM,qBAAqB,CAAC;AAAA,GACzB;;;AEJb,SAAS,UAAAC,eAAc;AAIhB,IAAM,wBAAN,cAAoC,oBAAoB;AAAC;AAAnD,wBAAN;AAAA,EADNC,QAAO,EAAE,MAAM,qBAAqB,CAAC;AAAA,GACzB;;;ACJb,SAAS,UAAAC,eAAc;AAIhB,IAAM,uBAAN,cAAmC,oBAAoB;AAAC;AAAlD,uBAAN;AAAA,EADNC,QAAO,EAAE,MAAM,qBAAqB,CAAC;AAAA,GACzB;;;ACJb,SAAS,UAAAC,eAAc;AAIhB,IAAM,uBAAN,cAAmC,oBAAoB;AAAC;AAAlD,uBAAN;AAAA,EADNC,QAAO,EAAE,MAAM,qBAAqB,CAAC;AAAA,GACzB;;;ACJb,SAAS,UAAAC,eAAc;AAIhB,IAAM,gBAAN,cAA4B,oBAAoB;AAAC;AAA3C,gBAAN;AAAA,EADNC,QAAO,EAAE,MAAM,kBAAkB,CAAC;AAAA,GACtB;","names":["Entity","Entity","PrimaryGeneratedColumn","Column","Field","ObjectType","PrimaryGeneratedColumn","Field","Column","ObjectType","Entity","Entity","Entity","Entity","Entity","Entity","Entity","Entity","Entity","Entity"]}
package/dist/index.mjs ADDED
@@ -0,0 +1,11 @@
1
+ import {
2
+ __commonJS
3
+ } from "./chunk-S2FWJ7OG.mjs";
4
+
5
+ // src/index.ts
6
+ var require_src = __commonJS({
7
+ "src/index.ts"() {
8
+ }
9
+ });
10
+ export default require_src();
11
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":[""],"mappings":";;;;;AAAA;AAAA;AAAA;AAAA;","names":[]}
@@ -0,0 +1,14 @@
1
+ import { BigNumber } from 'ethers';
2
+
3
+ declare class ColumnNumericTransformer {
4
+ to(data: number): number;
5
+ from(data: string): number;
6
+ }
7
+ declare const numericTransformer: ColumnNumericTransformer;
8
+ declare class ColumnBigNumberTransformer {
9
+ to(data?: BigNumber): bigint | undefined;
10
+ from(data?: bigint): BigNumber | null;
11
+ }
12
+ declare const bigNumberTransformer: ColumnBigNumberTransformer;
13
+
14
+ export { bigNumberTransformer, numericTransformer };
@@ -0,0 +1,10 @@
1
+ import {
2
+ bigNumberTransformer,
3
+ numericTransformer
4
+ } from "../chunk-DSJHHCBP.mjs";
5
+ import "../chunk-S2FWJ7OG.mjs";
6
+ export {
7
+ bigNumberTransformer,
8
+ numericTransformer
9
+ };
10
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "type": "module",
3
- "main": "../dist/entity/index.js"
3
+ "main": "../dist/entity/index.mjs"
4
4
  }
package/package.json CHANGED
@@ -1,43 +1,49 @@
1
1
  {
2
2
  "name": "@dhedge/backend-flatcoin-core",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Backend Flatcoin Core",
5
- "type": "module",
6
- "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
5
+ "type": "commonjs",
6
+ "main": "dist/index.mjs",
7
+ "types": "dist/index.d.mts",
8
8
  "exports": {
9
9
  ".": {
10
- "types": "./dist/index.d.ts",
11
- "default": "./dist/index.js"
10
+ "types": "./dist/index.d.mts",
11
+ "default": "./dist/index.mjs"
12
12
  },
13
13
  "./entity": {
14
- "types": "./dist/entity/index.d.ts",
15
- "default": "./dist/entity/index.js"
14
+ "types": "./dist/entity/index.d.mts",
15
+ "default": "./dist/entity/index.mjs"
16
+ },
17
+ "./utils": {
18
+ "types": "./dist/utils/index.d.mts",
19
+ "default": "./dist/utils/index.mjs"
16
20
  },
17
21
  "./package.json": "./package.json"
18
22
  },
19
23
  "files": [
20
24
  "/entity",
25
+ "/utils",
21
26
  "/dist"
22
27
  ],
23
28
  "sideEffects": false,
24
29
  "dependencies": {
25
30
  "@nestjs/graphql": "^12.0.9",
26
- "typeorm": "^0.3.17"
31
+ "typeorm": "^0.3.17",
32
+ "ethers": "5.7.2"
27
33
  },
28
34
  "devDependencies": {
29
35
  "@swc/core": "^1.3.90",
30
36
  "@types/dedent": "^0.7.0",
31
37
  "@types/fs-extra": "^11.0.1",
32
- "@typescript-eslint/eslint-plugin": "^6.7.2",
33
- "@typescript-eslint/parser": "^6.7.2",
38
+ "@typescript-eslint/eslint-plugin": "^5.0.0",
39
+ "@typescript-eslint/parser": "^5.0.0",
34
40
  "dedent": "^0.7.0",
35
- "eslint": "^8.49.0",
36
- "eslint-config-prettier": "^9.0.0",
37
- "eslint-plugin-prettier": "^5.0.0",
41
+ "eslint": "^8.0.1",
42
+ "eslint-config-prettier": "^8.3.0",
43
+ "eslint-plugin-prettier": "^4.0.0",
38
44
  "execa": "^7.1.1",
39
45
  "fs-extra": "^11.1.1",
40
- "prettier": "3.0.3",
46
+ "prettier": "^2.3.2",
41
47
  "tsup": "^7.2.0",
42
48
  "typescript": "^5.0.0"
43
49
  },
@@ -0,0 +1,4 @@
1
+ {
2
+ "type": "module",
3
+ "main": "../dist/utils/index.mjs"
4
+ }
@@ -1,90 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __decorateClass = (decorators, target, key, kind) => {
4
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
- if (decorator = decorators[i])
7
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
- if (kind && result)
9
- __defProp(target, key, result);
10
- return result;
11
- };
12
-
13
- // src/entity/flatcoin.price.one.day.ts
14
- import { Entity as Entity2 } from "typeorm";
15
-
16
- // src/entity/flatcoin.price.parent.ts
17
- import { Entity, PrimaryGeneratedColumn, Column } from "typeorm";
18
- import { Field, ObjectType } from "@nestjs/graphql";
19
- var FlatcoinPriceParent = class {
20
- };
21
- __decorateClass([
22
- PrimaryGeneratedColumn({ name: "id" })
23
- ], FlatcoinPriceParent.prototype, "id", 2);
24
- __decorateClass([
25
- Field(),
26
- Column({ name: "price_usd", type: "numeric", precision: 30 })
27
- ], FlatcoinPriceParent.prototype, "priceUsd", 2);
28
- __decorateClass([
29
- Field(),
30
- Column({ name: "price_usd_formatted", type: "decimal", precision: 10, scale: 2 })
31
- ], FlatcoinPriceParent.prototype, "priceUsdFormatted", 2);
32
- __decorateClass([
33
- Field(),
34
- Column({ name: "timestamp", type: "numeric", precision: 25 })
35
- ], FlatcoinPriceParent.prototype, "timestamp", 2);
36
- __decorateClass([
37
- Column({ name: "block_number", type: "numeric", precision: 25 })
38
- ], FlatcoinPriceParent.prototype, "blockNumber", 2);
39
- FlatcoinPriceParent = __decorateClass([
40
- ObjectType(),
41
- Entity()
42
- ], FlatcoinPriceParent);
43
-
44
- // src/entity/flatcoin.price.one.day.ts
45
- var FlatcoinPriceOneDay = class extends FlatcoinPriceParent {
46
- };
47
- FlatcoinPriceOneDay = __decorateClass([
48
- Entity2({ name: "flatcoin_prices_1d" })
49
- ], FlatcoinPriceOneDay);
50
-
51
- // src/entity/flatcoin.price.one.month.ts
52
- import { Entity as Entity3 } from "typeorm";
53
- var FlatcoinPriceOneMonth = class extends FlatcoinPriceParent {
54
- };
55
- FlatcoinPriceOneMonth = __decorateClass([
56
- Entity3({ name: "flatcoin_prices_1m" })
57
- ], FlatcoinPriceOneMonth);
58
-
59
- // src/entity/flatcoin.price.one.week.ts
60
- import { Entity as Entity4 } from "typeorm";
61
- var FlatcoinPriceOneWeek = class extends FlatcoinPriceParent {
62
- };
63
- FlatcoinPriceOneWeek = __decorateClass([
64
- Entity4({ name: "flatcoin_prices_1w" })
65
- ], FlatcoinPriceOneWeek);
66
-
67
- // src/entity/flatcoin.price.one.year.ts
68
- import { Entity as Entity5 } from "typeorm";
69
- var FlatcoinPriceOneYear = class extends FlatcoinPriceParent {
70
- };
71
- FlatcoinPriceOneYear = __decorateClass([
72
- Entity5({ name: "flatcoin_prices_1y" })
73
- ], FlatcoinPriceOneYear);
74
-
75
- // src/entity/flatcoin.price.ts
76
- import { Entity as Entity6 } from "typeorm";
77
- var FlatcoinPrice = class extends FlatcoinPriceParent {
78
- };
79
- FlatcoinPrice = __decorateClass([
80
- Entity6({ name: "flatcoin_prices" })
81
- ], FlatcoinPrice);
82
- export {
83
- FlatcoinPrice,
84
- FlatcoinPriceOneDay,
85
- FlatcoinPriceOneMonth,
86
- FlatcoinPriceOneWeek,
87
- FlatcoinPriceOneYear,
88
- FlatcoinPriceParent
89
- };
90
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/entity/flatcoin.price.one.day.ts","../../src/entity/flatcoin.price.parent.ts","../../src/entity/flatcoin.price.one.month.ts","../../src/entity/flatcoin.price.one.week.ts","../../src/entity/flatcoin.price.one.year.ts","../../src/entity/flatcoin.price.ts"],"sourcesContent":["import { Entity } from 'typeorm';\nimport { FlatcoinPriceParent } from './flatcoin.price.parent';\n\n@Entity({ name: 'flatcoin_prices_1d' })\nexport class FlatcoinPriceOneDay extends FlatcoinPriceParent {}\n","import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';\nimport { Field, ObjectType } from '@nestjs/graphql';\n\n@ObjectType()\n@Entity()\nexport abstract class FlatcoinPriceParent {\n @PrimaryGeneratedColumn({ name: 'id' })\n id: number;\n\n @Field()\n @Column({ name: 'price_usd', type: 'numeric', precision: 30 })\n priceUsd: string;\n\n @Field()\n @Column({ name: 'price_usd_formatted', type: 'decimal', precision: 10, scale: 2 })\n priceUsdFormatted: number;\n\n @Field()\n @Column({ name: 'timestamp', type: 'numeric', precision: 25 })\n timestamp: number;\n\n @Column({ name: 'block_number', type: 'numeric', precision: 25 })\n blockNumber: number;\n}\n","import { Entity } from 'typeorm';\nimport { FlatcoinPriceParent } from './flatcoin.price.parent';\n\n@Entity({ name: 'flatcoin_prices_1m' })\nexport class FlatcoinPriceOneMonth extends FlatcoinPriceParent {}\n","import { Entity } from 'typeorm';\nimport { FlatcoinPriceParent } from './flatcoin.price.parent';\n\n@Entity({ name: 'flatcoin_prices_1w' })\nexport class FlatcoinPriceOneWeek extends FlatcoinPriceParent {}\n","import { Entity } from 'typeorm';\nimport { FlatcoinPriceParent } from './flatcoin.price.parent';\n\n@Entity({ name: 'flatcoin_prices_1y' })\nexport class FlatcoinPriceOneYear extends FlatcoinPriceParent {}\n","import { Entity } from 'typeorm';\nimport { FlatcoinPriceParent } from './flatcoin.price.parent';\n\n@Entity({ name: 'flatcoin_prices' })\nexport class FlatcoinPrice extends FlatcoinPriceParent {}\n"],"mappings":";;;;;;;;;;;;;AAAA,SAAS,UAAAA,eAAc;;;ACAvB,SAAS,QAAQ,wBAAwB,cAAc;AACvD,SAAS,OAAO,kBAAkB;AAI3B,IAAe,sBAAf,MAAmC;AAkB1C;AAhBE;AAAA,EADC,uBAAuB,EAAE,MAAM,KAAK,CAAC;AAAA,GADlB,oBAEpB;AAIA;AAAA,EAFC,MAAM;AAAA,EACN,OAAO,EAAE,MAAM,aAAa,MAAM,WAAW,WAAW,GAAG,CAAC;AAAA,GALzC,oBAMpB;AAIA;AAAA,EAFC,MAAM;AAAA,EACN,OAAO,EAAE,MAAM,uBAAuB,MAAM,WAAW,WAAW,IAAI,OAAO,EAAE,CAAC;AAAA,GAT7D,oBAUpB;AAIA;AAAA,EAFC,MAAM;AAAA,EACN,OAAO,EAAE,MAAM,aAAa,MAAM,WAAW,WAAW,GAAG,CAAC;AAAA,GAbzC,oBAcpB;AAGA;AAAA,EADC,OAAO,EAAE,MAAM,gBAAgB,MAAM,WAAW,WAAW,GAAG,CAAC;AAAA,GAhB5C,oBAiBpB;AAjBoB,sBAAf;AAAA,EAFN,WAAW;AAAA,EACX,OAAO;AAAA,GACc;;;ADDf,IAAM,sBAAN,cAAkC,oBAAoB;AAAC;AAAjD,sBAAN;AAAA,EADNC,QAAO,EAAE,MAAM,qBAAqB,CAAC;AAAA,GACzB;;;AEJb,SAAS,UAAAC,eAAc;AAIhB,IAAM,wBAAN,cAAoC,oBAAoB;AAAC;AAAnD,wBAAN;AAAA,EADNC,QAAO,EAAE,MAAM,qBAAqB,CAAC;AAAA,GACzB;;;ACJb,SAAS,UAAAC,eAAc;AAIhB,IAAM,uBAAN,cAAmC,oBAAoB;AAAC;AAAlD,uBAAN;AAAA,EADNC,QAAO,EAAE,MAAM,qBAAqB,CAAC;AAAA,GACzB;;;ACJb,SAAS,UAAAC,eAAc;AAIhB,IAAM,uBAAN,cAAmC,oBAAoB;AAAC;AAAlD,uBAAN;AAAA,EADNC,QAAO,EAAE,MAAM,qBAAqB,CAAC;AAAA,GACzB;;;ACJb,SAAS,UAAAC,eAAc;AAIhB,IAAM,gBAAN,cAA4B,oBAAoB;AAAC;AAA3C,gBAAN;AAAA,EADNC,QAAO,EAAE,MAAM,kBAAkB,CAAC;AAAA,GACtB;","names":["Entity","Entity","Entity","Entity","Entity","Entity","Entity","Entity","Entity","Entity"]}
package/dist/index.js DELETED
@@ -1 +0,0 @@
1
- //# sourceMappingURL=index.js.map
File without changes
File without changes