@riocrypto/common-server 1.0.2683 → 1.0.2684

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.
@@ -5,7 +5,6 @@ interface FillAttrs {
5
5
  effectiveDate: Date;
6
6
  orderId: string;
7
7
  symbol: string;
8
- status: string;
9
8
  side: Side;
10
9
  price: number;
11
10
  qty: number;
@@ -15,13 +14,13 @@ interface FillAttrs {
15
14
  note?: string;
16
15
  referenceRate?: number;
17
16
  valueDate?: Date;
17
+ externalTradeId?: string;
18
18
  }
19
19
  interface FillDoc extends Document {
20
20
  createdAt: Date;
21
21
  effectiveDate: Date;
22
22
  orderId: string;
23
23
  symbol: string;
24
- status: string;
25
24
  side: Side;
26
25
  price: number;
27
26
  qty: number;
@@ -31,6 +30,7 @@ interface FillDoc extends Document {
31
30
  note?: string;
32
31
  referenceRate?: number;
33
32
  valueDate?: Date;
33
+ externalTradeId?: string;
34
34
  }
35
35
  interface FillModel extends Model<FillDoc> {
36
36
  build(attrs: FillAttrs): FillDoc;
@@ -10,7 +10,6 @@ const buildFill = (mongoose) => {
10
10
  effectiveDate: { type: Date, required: true },
11
11
  orderId: { type: String, required: true },
12
12
  symbol: { type: String, required: true },
13
- status: { type: String, required: true },
14
13
  side: { type: String, required: true },
15
14
  price: { type: Number, required: true },
16
15
  qty: { type: Number, required: true },
@@ -19,11 +18,13 @@ const buildFill = (mongoose) => {
19
18
  isDeleted: { type: Boolean, required: true, default: false },
20
19
  note: { type: String, required: false },
21
20
  referenceRate: { type: Number, required: false },
22
- valueDate: { type: Date, required: false }
21
+ valueDate: { type: Date, required: false },
22
+ externalTradeId: { type: String, required: false }
23
23
  });
24
24
  FillSchema.index({ createdAt: -1 });
25
25
  FillSchema.index({ orderId: -1 });
26
26
  FillSchema.index({ source: 1, createdAt: -1 });
27
+ FillSchema.index({ externalTradeId: 1 });
27
28
  FillSchema.statics.build = (attrs) => {
28
29
  return new Fill(attrs);
29
30
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2683",
3
+ "version": "1.0.2684",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",