@common_ch/common 1.0.109 → 1.0.111
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.
|
@@ -13,10 +13,14 @@ export interface UserAttrs {
|
|
|
13
13
|
amountApiExistPlan?: number;
|
|
14
14
|
amountUploadExistPlan?: number;
|
|
15
15
|
email?: string;
|
|
16
|
+
versionLimit?: number;
|
|
17
|
+
limitNumberOfUsers?: number;
|
|
18
|
+
limit?: boolean;
|
|
16
19
|
username?: string;
|
|
17
20
|
mobile?: string;
|
|
18
21
|
status?: userStatusEnum;
|
|
19
22
|
name?: string;
|
|
23
|
+
password?: string;
|
|
20
24
|
family?: string;
|
|
21
25
|
updatedPortal?: boolean;
|
|
22
26
|
createdAt?: number;
|
|
@@ -38,6 +42,10 @@ export interface UserDoc extends mongoose.Document {
|
|
|
38
42
|
email?: string;
|
|
39
43
|
username?: string;
|
|
40
44
|
mobile?: string;
|
|
45
|
+
versionLimit?: number;
|
|
46
|
+
limitNumberOfUsers?: number;
|
|
47
|
+
limit?: boolean;
|
|
48
|
+
password?: string;
|
|
41
49
|
status?: string;
|
|
42
50
|
name?: string;
|
|
43
51
|
family?: string;
|
package/build/models/app/user.js
CHANGED
|
@@ -55,11 +55,30 @@ const userSchema = new mongoose_1.default.Schema({
|
|
|
55
55
|
type: String,
|
|
56
56
|
required: false,
|
|
57
57
|
},
|
|
58
|
+
password: {
|
|
59
|
+
type: String,
|
|
60
|
+
required: false,
|
|
61
|
+
},
|
|
58
62
|
exTimePlan: {
|
|
59
63
|
type: mongoose_1.default.Schema.Types.Date,
|
|
60
64
|
default: () => new Date().toISOString(),
|
|
61
65
|
required: true,
|
|
62
66
|
},
|
|
67
|
+
limit: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
required: false,
|
|
70
|
+
default: false,
|
|
71
|
+
},
|
|
72
|
+
versionLimit: {
|
|
73
|
+
type: Number,
|
|
74
|
+
required: false,
|
|
75
|
+
default: 0,
|
|
76
|
+
},
|
|
77
|
+
limitNumberOfUsers: {
|
|
78
|
+
type: Number,
|
|
79
|
+
required: false,
|
|
80
|
+
default: 10,
|
|
81
|
+
},
|
|
63
82
|
startTimePlan: {
|
|
64
83
|
type: mongoose_1.default.Schema.Types.Date,
|
|
65
84
|
default: () => new Date().toISOString(),
|
|
@@ -97,6 +116,11 @@ const userSchema = new mongoose_1.default.Schema({
|
|
|
97
116
|
},
|
|
98
117
|
}, {
|
|
99
118
|
timestamps: true,
|
|
119
|
+
toJSON: {
|
|
120
|
+
transform(doc, ret) {
|
|
121
|
+
delete ret.password;
|
|
122
|
+
},
|
|
123
|
+
},
|
|
100
124
|
});
|
|
101
125
|
userSchema.set('versionKey', 'version');
|
|
102
126
|
userSchema.plugin(mongoose_update_if_current_1.updateIfCurrentPlugin);
|