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 +3 -1
- package/package.json +1 -1
- package/schema/dailyWorkLog.model.js +3 -0
- package/schema/finance.model.js +86 -0
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
|
@@ -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);
|