tango-api-schema 1.0.58 → 1.0.60

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.
package/index.js CHANGED
@@ -35,6 +35,7 @@ import eyeTestModel from './schema/eyeTest.model.js';
35
35
  import ticketModel from "./schema/ticket.model.js";
36
36
  import activitylogModel from "./schema/activitylog.model.js";
37
37
  import dailyWorkLogModel from "./schema/dailyWorkLog.model.js";
38
+ import financeModel from "./schema/finance.model.js";
38
39
 
39
40
  export default {
40
41
  clientModel,
@@ -73,5 +74,6 @@ export default {
73
74
  eyeTestModel,
74
75
  ticketModel,
75
76
  activitylogModel,
76
- dailyWorkLogModel
77
+ dailyWorkLogModel,
78
+ financeModel
77
79
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-api-schema",
3
- "version": "1.0.58",
3
+ "version": "1.0.60",
4
4
  "description": "tangoEye model schema",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -11,6 +11,9 @@ const collection = new mongoose.Schema(
11
11
  type: String,
12
12
  required: true,
13
13
  },
14
+ storeName: {
15
+ type: String,
16
+ },
14
17
  storeDate: {
15
18
  type: String,
16
19
  required: true,
@@ -0,0 +1,86 @@
1
+ import mongoose from "mongoose";
2
+ import uniqueValidator from "mongoose-unique-validator";
3
+
4
+ const financeSchema = new mongoose.Schema(
5
+ {
6
+ brandName: {
7
+ type: String
8
+ },
9
+ brandIndex: {
10
+ type: Number,
11
+ },
12
+ clientId: {
13
+ type: String,
14
+ trim: true,
15
+ },
16
+ active: {
17
+ type: Boolean,
18
+ default: true,
19
+ },
20
+ clientStatus: {
21
+ type: String,
22
+ enum: ["pending", "live", "hold", "suspended", "deactivated", "rejected"],
23
+ trim: true,
24
+ },
25
+ accountType: {
26
+ type: String,
27
+ enum: ["free", "trial", "paid"],
28
+ trim: true,
29
+ default: "trial",
30
+ },
31
+ finance: {
32
+ costPerStore: {
33
+ type: Number,
34
+ },
35
+ },
36
+ proRate:{
37
+ type:Boolean,
38
+ default:false
39
+ },
40
+ stores: [
41
+ {
42
+ store: {
43
+ type: mongoose.Schema.Types.ObjectId,
44
+ ref: "store",
45
+ },
46
+ storeId: {
47
+ type: String
48
+ },
49
+ active: {
50
+ type: String
51
+ },
52
+ deployedStatus: {
53
+ type: Boolean,
54
+ default: false,
55
+ },
56
+ isdeletedstore: {
57
+ type: Boolean,
58
+ default: false,
59
+ },
60
+ firstFileDate: {
61
+ type: Date,
62
+ },
63
+ edgeFileDate:{
64
+ type: Date,
65
+ },
66
+ daysDifference:{
67
+ type:Number
68
+ },
69
+ dataProcess: {
70
+ type: String,
71
+ enum: [ 'hold', 'suspend', 'active', 'deActive' ],
72
+ default: 'active',
73
+ },
74
+ }
75
+ ]
76
+ },
77
+ {
78
+ strict: true,
79
+ versionKey: false,
80
+ timestamps: true,
81
+ }
82
+ );
83
+
84
+ financeSchema.plugin(uniqueValidator);
85
+
86
+ export default mongoose.model("Finance", financeSchema);