tango-api-schema 1.0.59 → 1.0.61

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.59",
3
+ "version": "1.0.61",
4
4
  "description": "tangoEye model schema",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -0,0 +1,90 @@
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
+ dateString:{
10
+ type:String
11
+ },
12
+ dateIso:{
13
+ type:Date,
14
+ default:new Date()
15
+ },
16
+ clientId: {
17
+ type: String,
18
+ trim: true,
19
+ },
20
+ active: {
21
+ type: Boolean,
22
+ default: true,
23
+ },
24
+ clientStatus: {
25
+ type: String,
26
+ enum: ["pending", "live", "hold", "suspended", "deactivated", "rejected"],
27
+ trim: true,
28
+ },
29
+ accountType: {
30
+ type: String,
31
+ enum: ["free", "trial", "paid"],
32
+ trim: true,
33
+ default: "trial",
34
+ },
35
+ finance: {
36
+ costPerStore: {
37
+ type: Number,
38
+ },
39
+ },
40
+ proRate:{
41
+ type:Boolean,
42
+ default:false
43
+ },
44
+ stores: [
45
+ {
46
+ store: {
47
+ type: mongoose.Schema.Types.ObjectId,
48
+ ref: "store",
49
+ },
50
+ storeId: {
51
+ type: String
52
+ },
53
+ active: {
54
+ type: String
55
+ },
56
+ deployedStatus: {
57
+ type: Boolean,
58
+ default: false,
59
+ },
60
+ isdeletedstore: {
61
+ type: Boolean,
62
+ default: false,
63
+ },
64
+ processfirstFileDate: {
65
+ type: Date,
66
+ },
67
+ edgefirstFileDate:{
68
+ type: Date,
69
+ },
70
+ Date:{
71
+ type:Date
72
+ },
73
+ dataProcess: {
74
+ type: String,
75
+ enum: [ 'hold', 'suspend', 'active', 'deActive' ],
76
+ default: 'active',
77
+ },
78
+ }
79
+ ]
80
+ },
81
+ {
82
+ strict: true,
83
+ versionKey: false,
84
+ timestamps: true,
85
+ }
86
+ );
87
+
88
+ financeSchema.plugin(uniqueValidator);
89
+
90
+ export default mongoose.model("Finance", financeSchema);