@youjunhuang/entity-core 1.0.0
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/dist/data_access/base/base.repository.d.ts +29 -0
- package/dist/data_access/base/base.repository.d.ts.map +1 -0
- package/dist/data_access/base/base.repository.js +7 -0
- package/dist/data_access/base/base.repository.js.map +1 -0
- package/dist/data_access/base/index.d.ts +4 -0
- package/dist/data_access/base/index.d.ts.map +1 -0
- package/dist/data_access/base/index.js +20 -0
- package/dist/data_access/base/index.js.map +1 -0
- package/dist/data_access/base/mongo-base.repository.d.ts +34 -0
- package/dist/data_access/base/mongo-base.repository.d.ts.map +1 -0
- package/dist/data_access/base/mongo-base.repository.js +229 -0
- package/dist/data_access/base/mongo-base.repository.js.map +1 -0
- package/dist/data_access/base/sql-base.repository.d.ts +20 -0
- package/dist/data_access/base/sql-base.repository.d.ts.map +1 -0
- package/dist/data_access/base/sql-base.repository.js +180 -0
- package/dist/data_access/base/sql-base.repository.js.map +1 -0
- package/dist/data_access/index.d.ts +3 -0
- package/dist/data_access/index.d.ts.map +1 -0
- package/dist/data_access/index.js +20 -0
- package/dist/data_access/index.js.map +1 -0
- package/dist/data_access/mongo/account-mongo.repository.d.ts +14 -0
- package/dist/data_access/mongo/account-mongo.repository.d.ts.map +1 -0
- package/dist/data_access/mongo/account-mongo.repository.js +43 -0
- package/dist/data_access/mongo/account-mongo.repository.js.map +1 -0
- package/dist/data_access/mongo/attachment-mongo.repository.d.ts +139 -0
- package/dist/data_access/mongo/attachment-mongo.repository.d.ts.map +1 -0
- package/dist/data_access/mongo/attachment-mongo.repository.js +355 -0
- package/dist/data_access/mongo/attachment-mongo.repository.js.map +1 -0
- package/dist/data_access/mongo/biometric-cred.repository.d.ts +8 -0
- package/dist/data_access/mongo/biometric-cred.repository.d.ts.map +1 -0
- package/dist/data_access/mongo/biometric-cred.repository.js +32 -0
- package/dist/data_access/mongo/biometric-cred.repository.js.map +1 -0
- package/dist/data_access/mongo/camera-mongo.repository.d.ts +9 -0
- package/dist/data_access/mongo/camera-mongo.repository.d.ts.map +1 -0
- package/dist/data_access/mongo/camera-mongo.repository.js +39 -0
- package/dist/data_access/mongo/camera-mongo.repository.js.map +1 -0
- package/dist/data_access/mongo/camera-recording-mongo.repository.d.ts +9 -0
- package/dist/data_access/mongo/camera-recording-mongo.repository.d.ts.map +1 -0
- package/dist/data_access/mongo/camera-recording-mongo.repository.js +39 -0
- package/dist/data_access/mongo/camera-recording-mongo.repository.js.map +1 -0
- package/dist/data_access/mongo/event-mongo.repository.d.ts +23 -0
- package/dist/data_access/mongo/event-mongo.repository.d.ts.map +1 -0
- package/dist/data_access/mongo/event-mongo.repository.js +175 -0
- package/dist/data_access/mongo/event-mongo.repository.js.map +1 -0
- package/dist/data_access/mongo/event-template-mongo.repository.d.ts +8 -0
- package/dist/data_access/mongo/event-template-mongo.repository.d.ts.map +1 -0
- package/dist/data_access/mongo/event-template-mongo.repository.js +36 -0
- package/dist/data_access/mongo/event-template-mongo.repository.js.map +1 -0
- package/dist/data_access/mongo/event-template-name-mongo.repository.d.ts +19 -0
- package/dist/data_access/mongo/event-template-name-mongo.repository.d.ts.map +1 -0
- package/dist/data_access/mongo/event-template-name-mongo.repository.js +47 -0
- package/dist/data_access/mongo/event-template-name-mongo.repository.js.map +1 -0
- package/dist/data_access/mongo/index.d.ts +17 -0
- package/dist/data_access/mongo/index.d.ts.map +1 -0
- package/dist/data_access/mongo/index.js +33 -0
- package/dist/data_access/mongo/index.js.map +1 -0
- package/dist/data_access/mongo/map-mongo.repository.d.ts +9 -0
- package/dist/data_access/mongo/map-mongo.repository.d.ts.map +1 -0
- package/dist/data_access/mongo/map-mongo.repository.js +46 -0
- package/dist/data_access/mongo/map-mongo.repository.js.map +1 -0
- package/dist/data_access/mongo/password-cred.repository.d.ts +8 -0
- package/dist/data_access/mongo/password-cred.repository.d.ts.map +1 -0
- package/dist/data_access/mongo/password-cred.repository.js +32 -0
- package/dist/data_access/mongo/password-cred.repository.js.map +1 -0
- package/dist/data_access/mongo/permission-mongo.repository.d.ts +8 -0
- package/dist/data_access/mongo/permission-mongo.repository.d.ts.map +1 -0
- package/dist/data_access/mongo/permission-mongo.repository.js +32 -0
- package/dist/data_access/mongo/permission-mongo.repository.js.map +1 -0
- package/dist/data_access/mongo/report.repository.d.ts +12 -0
- package/dist/data_access/mongo/report.repository.d.ts.map +1 -0
- package/dist/data_access/mongo/report.repository.js +52 -0
- package/dist/data_access/mongo/report.repository.js.map +1 -0
- package/dist/data_access/mongo/role-mongo.repository.d.ts +7 -0
- package/dist/data_access/mongo/role-mongo.repository.d.ts.map +1 -0
- package/dist/data_access/mongo/role-mongo.repository.js +35 -0
- package/dist/data_access/mongo/role-mongo.repository.js.map +1 -0
- package/dist/data_access/mongo/third-party-cred.repository.d.ts +8 -0
- package/dist/data_access/mongo/third-party-cred.repository.d.ts.map +1 -0
- package/dist/data_access/mongo/third-party-cred.repository.js +32 -0
- package/dist/data_access/mongo/third-party-cred.repository.js.map +1 -0
- package/dist/data_access/mongo/ui-item-mongo.repository.d.ts +7 -0
- package/dist/data_access/mongo/ui-item-mongo.repository.d.ts.map +1 -0
- package/dist/data_access/mongo/ui-item-mongo.repository.js +35 -0
- package/dist/data_access/mongo/ui-item-mongo.repository.js.map +1 -0
- package/dist/data_access/mongo/user-mongo.repository.d.ts +8 -0
- package/dist/data_access/mongo/user-mongo.repository.d.ts.map +1 -0
- package/dist/data_access/mongo/user-mongo.repository.js +39 -0
- package/dist/data_access/mongo/user-mongo.repository.js.map +1 -0
- package/dist/data_access/sql/index.d.ts +1 -0
- package/dist/data_access/sql/index.d.ts.map +1 -0
- package/dist/data_access/sql/index.js +3 -0
- package/dist/data_access/sql/index.js.map +1 -0
- package/dist/data_access/sql/user-profiles.repository.d.ts +1 -0
- package/dist/data_access/sql/user-profiles.repository.d.ts.map +1 -0
- package/dist/data_access/sql/user-profiles.repository.js +36 -0
- package/dist/data_access/sql/user-profiles.repository.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/models/account.d.ts +27 -0
- package/dist/models/account.d.ts.map +1 -0
- package/dist/models/account.js +3 -0
- package/dist/models/account.js.map +1 -0
- package/dist/models/attachment.d.ts +147 -0
- package/dist/models/attachment.d.ts.map +1 -0
- package/dist/models/attachment.js +25 -0
- package/dist/models/attachment.js.map +1 -0
- package/dist/models/auth-credential.d.ts +46 -0
- package/dist/models/auth-credential.d.ts.map +1 -0
- package/dist/models/auth-credential.js +10 -0
- package/dist/models/auth-credential.js.map +1 -0
- package/dist/models/camera.d.ts +156 -0
- package/dist/models/camera.d.ts.map +1 -0
- package/dist/models/camera.js +34 -0
- package/dist/models/camera.js.map +1 -0
- package/dist/models/chatroom.d.ts +55 -0
- package/dist/models/chatroom.d.ts.map +1 -0
- package/dist/models/chatroom.js +3 -0
- package/dist/models/chatroom.js.map +1 -0
- package/dist/models/device.d.ts +50 -0
- package/dist/models/device.d.ts.map +1 -0
- package/dist/models/device.js +3 -0
- package/dist/models/device.js.map +1 -0
- package/dist/models/event.d.ts +170 -0
- package/dist/models/event.d.ts.map +1 -0
- package/dist/models/event.js +195 -0
- package/dist/models/event.js.map +1 -0
- package/dist/models/index.d.ts +19 -0
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +35 -0
- package/dist/models/index.js.map +1 -0
- package/dist/models/inform.d.ts +146 -0
- package/dist/models/inform.d.ts.map +1 -0
- package/dist/models/inform.js +61 -0
- package/dist/models/inform.js.map +1 -0
- package/dist/models/map.d.ts +26 -0
- package/dist/models/map.d.ts.map +1 -0
- package/dist/models/map.js +3 -0
- package/dist/models/map.js.map +1 -0
- package/dist/models/permission.d.ts +83 -0
- package/dist/models/permission.d.ts.map +1 -0
- package/dist/models/permission.js +78 -0
- package/dist/models/permission.js.map +1 -0
- package/dist/models/report.d.ts +167 -0
- package/dist/models/report.d.ts.map +1 -0
- package/dist/models/report.js +61 -0
- package/dist/models/report.js.map +1 -0
- package/dist/models/role.d.ts +84 -0
- package/dist/models/role.d.ts.map +1 -0
- package/dist/models/role.js +25 -0
- package/dist/models/role.js.map +1 -0
- package/dist/models/schedule.d.ts +39 -0
- package/dist/models/schedule.d.ts.map +1 -0
- package/dist/models/schedule.js +3 -0
- package/dist/models/schedule.js.map +1 -0
- package/dist/models/task.d.ts +97 -0
- package/dist/models/task.d.ts.map +1 -0
- package/dist/models/task.js +24 -0
- package/dist/models/task.js.map +1 -0
- package/dist/models/template.d.ts +197 -0
- package/dist/models/template.d.ts.map +1 -0
- package/dist/models/template.js +64 -0
- package/dist/models/template.js.map +1 -0
- package/dist/models/ui-item.d.ts +40 -0
- package/dist/models/ui-item.d.ts.map +1 -0
- package/dist/models/ui-item.js +17 -0
- package/dist/models/ui-item.js.map +1 -0
- package/dist/models/user.d.ts +125 -0
- package/dist/models/user.d.ts.map +1 -0
- package/dist/models/user.js +22 -0
- package/dist/models/user.js.map +1 -0
- package/dist/models/utils.d.ts +28 -0
- package/dist/models/utils.d.ts.map +1 -0
- package/dist/models/utils.js +3 -0
- package/dist/models/utils.js.map +1 -0
- package/dist/schemas/index.d.ts +2 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +18 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/mongo/account-mongo.schema.d.ts +27 -0
- package/dist/schemas/mongo/account-mongo.schema.d.ts.map +1 -0
- package/dist/schemas/mongo/account-mongo.schema.js +22 -0
- package/dist/schemas/mongo/account-mongo.schema.js.map +1 -0
- package/dist/schemas/mongo/attachment-mongo.schema.d.ts +134 -0
- package/dist/schemas/mongo/attachment-mongo.schema.d.ts.map +1 -0
- package/dist/schemas/mongo/attachment-mongo.schema.js +182 -0
- package/dist/schemas/mongo/attachment-mongo.schema.js.map +1 -0
- package/dist/schemas/mongo/biometric-cred.schema.d.ts +27 -0
- package/dist/schemas/mongo/biometric-cred.schema.d.ts.map +1 -0
- package/dist/schemas/mongo/biometric-cred.schema.js +24 -0
- package/dist/schemas/mongo/biometric-cred.schema.js.map +1 -0
- package/dist/schemas/mongo/camera-mongo.schema.d.ts +21 -0
- package/dist/schemas/mongo/camera-mongo.schema.d.ts.map +1 -0
- package/dist/schemas/mongo/camera-mongo.schema.js +54 -0
- package/dist/schemas/mongo/camera-mongo.schema.js.map +1 -0
- package/dist/schemas/mongo/camera-recording-mongo.schema.d.ts +21 -0
- package/dist/schemas/mongo/camera-recording-mongo.schema.d.ts.map +1 -0
- package/dist/schemas/mongo/camera-recording-mongo.schema.js +24 -0
- package/dist/schemas/mongo/camera-recording-mongo.schema.js.map +1 -0
- package/dist/schemas/mongo/event-mongo.schema.d.ts +51 -0
- package/dist/schemas/mongo/event-mongo.schema.d.ts.map +1 -0
- package/dist/schemas/mongo/event-mongo.schema.js +63 -0
- package/dist/schemas/mongo/event-mongo.schema.js.map +1 -0
- package/dist/schemas/mongo/event-template-mongo.schema.d.ts +39 -0
- package/dist/schemas/mongo/event-template-mongo.schema.d.ts.map +1 -0
- package/dist/schemas/mongo/event-template-mongo.schema.js +33 -0
- package/dist/schemas/mongo/event-template-mongo.schema.js.map +1 -0
- package/dist/schemas/mongo/index.d.ts +16 -0
- package/dist/schemas/mongo/index.d.ts.map +1 -0
- package/dist/schemas/mongo/index.js +32 -0
- package/dist/schemas/mongo/index.js.map +1 -0
- package/dist/schemas/mongo/map-mongo.schema.d.ts +20 -0
- package/dist/schemas/mongo/map-mongo.schema.d.ts.map +1 -0
- package/dist/schemas/mongo/map-mongo.schema.js +16 -0
- package/dist/schemas/mongo/map-mongo.schema.js.map +1 -0
- package/dist/schemas/mongo/password-cred.schema.d.ts +27 -0
- package/dist/schemas/mongo/password-cred.schema.d.ts.map +1 -0
- package/dist/schemas/mongo/password-cred.schema.js +22 -0
- package/dist/schemas/mongo/password-cred.schema.js.map +1 -0
- package/dist/schemas/mongo/permission-mongo.schema.d.ts +21 -0
- package/dist/schemas/mongo/permission-mongo.schema.d.ts.map +1 -0
- package/dist/schemas/mongo/permission-mongo.schema.js +70 -0
- package/dist/schemas/mongo/permission-mongo.schema.js.map +1 -0
- package/dist/schemas/mongo/report-mongo.schema.d.ts +41 -0
- package/dist/schemas/mongo/report-mongo.schema.d.ts.map +1 -0
- package/dist/schemas/mongo/report-mongo.schema.js +71 -0
- package/dist/schemas/mongo/report-mongo.schema.js.map +1 -0
- package/dist/schemas/mongo/role-mongo.schema.d.ts +22 -0
- package/dist/schemas/mongo/role-mongo.schema.d.ts.map +1 -0
- package/dist/schemas/mongo/role-mongo.schema.js +73 -0
- package/dist/schemas/mongo/role-mongo.schema.js.map +1 -0
- package/dist/schemas/mongo/third-party-cred.schema.d.ts +27 -0
- package/dist/schemas/mongo/third-party-cred.schema.d.ts.map +1 -0
- package/dist/schemas/mongo/third-party-cred.schema.js +30 -0
- package/dist/schemas/mongo/third-party-cred.schema.js.map +1 -0
- package/dist/schemas/mongo/ui-item.schema.d.ts +23 -0
- package/dist/schemas/mongo/ui-item.schema.d.ts.map +1 -0
- package/dist/schemas/mongo/ui-item.schema.js +61 -0
- package/dist/schemas/mongo/ui-item.schema.js.map +1 -0
- package/dist/schemas/mongo/user-mongo.schema.d.ts +24 -0
- package/dist/schemas/mongo/user-mongo.schema.d.ts.map +1 -0
- package/dist/schemas/mongo/user-mongo.schema.js +34 -0
- package/dist/schemas/mongo/user-mongo.schema.js.map +1 -0
- package/package.json +34 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.RoleModel = exports.RoleSchema = void 0;
|
|
37
|
+
const mongoose_1 = __importStar(require("mongoose"));
|
|
38
|
+
// 定義 Role 的 Schema
|
|
39
|
+
exports.RoleSchema = new mongoose_1.Schema({
|
|
40
|
+
id: { type: String, required: true, immutable: true }, // 使用 UUID 作為 id
|
|
41
|
+
// ownerId: { type: String },
|
|
42
|
+
name: { type: String, required: true },
|
|
43
|
+
// ownerType: { type: String, required: true, enum: OwnerType },
|
|
44
|
+
permissionId_list: [{ type: String, ref: 'Permission', index: true }]
|
|
45
|
+
}, { timestamps: true });
|
|
46
|
+
exports.RoleSchema.virtual('_permission_list', {
|
|
47
|
+
ref: 'Permission',
|
|
48
|
+
localField: 'permissionId_list',
|
|
49
|
+
foreignField: 'id',
|
|
50
|
+
justOne: false
|
|
51
|
+
});
|
|
52
|
+
exports.RoleSchema.post('findOneAndDelete', async function (doc) {
|
|
53
|
+
if (doc) {
|
|
54
|
+
const session = await mongoose_1.default.startSession();
|
|
55
|
+
try {
|
|
56
|
+
await session.withTransaction(async () => {
|
|
57
|
+
console.log(`Role ${doc.id} deleted, updating UserProfiles...`);
|
|
58
|
+
const UserModel = mongoose_1.default.model('UserProfile');
|
|
59
|
+
const result = await UserModel.updateMany({ roleId_list: doc.id }, { $pull: { roleId_list: doc.id } }, { session });
|
|
60
|
+
console.log(`Role ${doc.id} removed from ${result.modifiedCount} user-profiles.`);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
console.error(`Error updating user profiles: ${error.message}`);
|
|
65
|
+
}
|
|
66
|
+
finally {
|
|
67
|
+
session.endSession();
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
// 創建 Role 模型
|
|
72
|
+
exports.RoleModel = (0, mongoose_1.model)('Role', exports.RoleSchema);
|
|
73
|
+
//# sourceMappingURL=role-mongo.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"role-mongo.schema.js","sourceRoot":"","sources":["../../../schemas/mongo/role-mongo.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAoE;AAgBpE,mBAAmB;AACN,QAAA,UAAU,GAAG,IAAI,iBAAM,CAAe;IACjD,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,gBAAgB;IACvE,6BAA6B;IAC7B,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IACtC,gEAAgE;IAChE,iBAAiB,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;CACtE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;AAEzB,kBAAU,CAAC,OAAO,CAAC,kBAAkB,EAAE;IACrC,GAAG,EAAE,YAAY;IACjB,UAAU,EAAE,mBAAmB;IAC/B,YAAY,EAAE,IAAI;IAClB,OAAO,EAAE,KAAK;CACf,CAAC,CAAC;AAEH,kBAAU,CAAC,IAAI,CAAC,kBAAkB,EAAE,KAAK,WAAW,GAAiB;IACnE,IAAI,GAAG,EAAE,CAAC;QACR,MAAM,OAAO,GAAG,MAAM,kBAAQ,CAAC,YAAY,EAAE,CAAC;QAC9C,IAAI,CAAC;YACH,MAAM,OAAO,CAAC,eAAe,CAAC,KAAK,IAAI,EAAE;gBACvC,OAAO,CAAC,GAAG,CAAC,QAAQ,GAAG,CAAC,EAAE,oCAAoC,CAAC,CAAC;gBAChE,MAAM,SAAS,GAAG,kBAAQ,CAAC,KAAK,CAAC,aAAa,CAA+B,CAAC;gBAE9E,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,UAAU,CACvC,EAAE,WAAW,EAAE,GAAG,CAAC,EAAE,EAAE,EACvB,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,GAAG,CAAC,EAAE,EAAE,EAAE,EAClC,EAAE,OAAO,EAAE,CACZ,CAAC;gBAEF,OAAO,CAAC,GAAG,CAAC,QAAQ,GAAG,CAAC,EAAE,iBAAiB,MAAM,CAAC,aAAa,iBAAiB,CAAC,CAAC;YACpF,CAAC,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,OAAO,CAAC,KAAK,CAAC,iCAAiC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAClE,CAAC;gBAAS,CAAC;YACT,OAAO,CAAC,UAAU,EAAE,CAAC;QACvB,CAAC;IACH,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,aAAa;AACA,QAAA,SAAS,GAAG,IAAA,gBAAK,EAAe,MAAM,EAAE,kBAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Schema, Document, Types } from 'mongoose';
|
|
2
|
+
import { ThirdPartyCredential } from '../../models';
|
|
3
|
+
import { UserProfileDocument } from './user-mongo.schema';
|
|
4
|
+
export type IThirdPartyCredentialMongoose = Omit<ThirdPartyCredential, 'userId'> & {
|
|
5
|
+
userId: Types.ObjectId | string | UserProfileDocument;
|
|
6
|
+
_user?: UserProfileDocument;
|
|
7
|
+
};
|
|
8
|
+
export interface ThirdPartyCredentialDocument extends Document, IThirdPartyCredentialMongoose {
|
|
9
|
+
id: string;
|
|
10
|
+
userId: Types.ObjectId | string | UserProfileDocument;
|
|
11
|
+
_user?: UserProfileDocument;
|
|
12
|
+
}
|
|
13
|
+
export declare const ThirdPartyCredentialSchema: Schema<ThirdPartyCredentialDocument, import("mongoose").Model<ThirdPartyCredentialDocument, any, any, any, Document<unknown, any, ThirdPartyCredentialDocument, any, {}> & ThirdPartyCredentialDocument & Required<{
|
|
14
|
+
_id: Types.ObjectId;
|
|
15
|
+
}> & {
|
|
16
|
+
__v: number;
|
|
17
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ThirdPartyCredentialDocument, Document<unknown, {}, import("mongoose").FlatRecord<ThirdPartyCredentialDocument>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<ThirdPartyCredentialDocument> & Required<{
|
|
18
|
+
_id: Types.ObjectId;
|
|
19
|
+
}> & {
|
|
20
|
+
__v: number;
|
|
21
|
+
}>;
|
|
22
|
+
export declare const ThirdPartyCredentialModel: import("mongoose").Model<ThirdPartyCredentialDocument, {}, {}, {}, Document<unknown, {}, ThirdPartyCredentialDocument, {}, {}> & ThirdPartyCredentialDocument & Required<{
|
|
23
|
+
_id: Types.ObjectId;
|
|
24
|
+
}> & {
|
|
25
|
+
__v: number;
|
|
26
|
+
}, any>;
|
|
27
|
+
//# sourceMappingURL=third-party-cred.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"third-party-cred.schema.d.ts","sourceRoot":"","sources":["../../../schemas/mongo/third-party-cred.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAS,QAAQ,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAI1D,MAAM,MAAM,6BAA6B,GAAG,IAAI,CAAC,oBAAoB,EAAE,QAAQ,CAAC,GAAG;IACjF,MAAM,EAAE,KAAK,CAAC,QAAQ,GAAG,MAAM,GAAG,mBAAmB,CAAC;IACtD,KAAK,CAAC,EAAE,mBAAmB,CAAC;CAC7B,CAAC;AAEF,MAAM,WAAW,4BAA6B,SAAQ,QAAQ,EAAE,6BAA6B;IAC3F,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,KAAK,CAAC,QAAQ,GAAG,MAAM,GAAG,mBAAmB,CAAC;IACtD,KAAK,CAAC,EAAE,mBAAmB,CAAC;CAC7B;AAGD,eAAO,MAAM,0BAA0B;;;;;;;;EAkBtC,CAAC;AAUF,eAAO,MAAM,yBAAyB;;;;OAA0F,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ThirdPartyCredentialModel = exports.ThirdPartyCredentialSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
// 定義 ThirdPartyCredential 的 Schema
|
|
6
|
+
exports.ThirdPartyCredentialSchema = new mongoose_1.Schema({
|
|
7
|
+
id: { type: String, required: true, immutable: true }, // 使用 UUID 作為 id
|
|
8
|
+
userId: { type: String, required: false, index: true }, // 使用者的唯一識別碼
|
|
9
|
+
providerName: { type: String, required: true },
|
|
10
|
+
// 第三方服務提供者名稱 (例如: Google, Facebook)
|
|
11
|
+
providerUserId: { type: String, required: true },
|
|
12
|
+
// 第三方服務提供者的使用者 ID
|
|
13
|
+
providerEmail: { type: String, required: true },
|
|
14
|
+
// 第三方服務提供者的電子郵件地址
|
|
15
|
+
providerDisplayName: { type: String, required: true },
|
|
16
|
+
// 第三方服務提供者的顯示名稱
|
|
17
|
+
providerAvatarUrl: { type: String, required: true },
|
|
18
|
+
// 第三方服務提供者的頭像 URL
|
|
19
|
+
isActive: { type: Boolean, default: true },
|
|
20
|
+
// 是否啟用此第三方登入憑證
|
|
21
|
+
}, { timestamps: true });
|
|
22
|
+
exports.ThirdPartyCredentialSchema.virtual('_user', {
|
|
23
|
+
ref: 'UserProfile',
|
|
24
|
+
localField: 'userId',
|
|
25
|
+
foreignField: 'id',
|
|
26
|
+
justOne: true,
|
|
27
|
+
});
|
|
28
|
+
// // 創建 ThirdPartyCredential 模型
|
|
29
|
+
exports.ThirdPartyCredentialModel = (0, mongoose_1.model)('ThirdPartyCredential', exports.ThirdPartyCredentialSchema);
|
|
30
|
+
//# sourceMappingURL=third-party-cred.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"third-party-cred.schema.js","sourceRoot":"","sources":["../../../schemas/mongo/third-party-cred.schema.ts"],"names":[],"mappings":";;;AAAA,uCAA0D;AAiB1D,mCAAmC;AACtB,QAAA,0BAA0B,GAAG,IAAI,iBAAM,CAClD;IACE,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,gBAAgB;IACvE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,YAAY;IACpE,YAAY,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC9C,oCAAoC;IACpC,cAAc,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IAChD,kBAAkB;IAClB,aAAa,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC/C,kBAAkB;IAClB,mBAAmB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IACrD,gBAAgB;IAChB,iBAAiB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IACnD,kBAAkB;IAClB,QAAQ,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;IAC1C,eAAe;CAChB,EACD,EAAE,UAAU,EAAE,IAAI,EAAE,CACrB,CAAC;AAEF,kCAA0B,CAAC,OAAO,CAAC,OAAO,EAAE;IAC1C,GAAG,EAAE,aAAa;IAClB,UAAU,EAAE,QAAQ;IACpB,YAAY,EAAE,IAAI;IAClB,OAAO,EAAE,IAAI;CACd,CAAC,CAAC;AAEH,gCAAgC;AACnB,QAAA,yBAAyB,GAAG,IAAA,gBAAK,EAA+B,sBAAsB,EAAE,kCAA0B,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Schema, Document, Model } from 'mongoose';
|
|
2
|
+
import * as mongoose from 'mongoose';
|
|
3
|
+
import { UiItem } from '../../models';
|
|
4
|
+
import { UserProfileDocument } from './user-mongo.schema';
|
|
5
|
+
export interface UiItemDocument extends Document, UiItem {
|
|
6
|
+
id: string;
|
|
7
|
+
_user?: UserProfileDocument | null;
|
|
8
|
+
}
|
|
9
|
+
export declare const UiItemSchema: Schema<UiItemDocument, Model<UiItemDocument, any, any, any, Document<unknown, any, UiItemDocument, any, {}> & UiItemDocument & Required<{
|
|
10
|
+
_id: mongoose.Types.ObjectId;
|
|
11
|
+
}> & {
|
|
12
|
+
__v: number;
|
|
13
|
+
}, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, UiItemDocument, Document<unknown, {}, mongoose.FlatRecord<UiItemDocument>, {}, mongoose.ResolveSchemaOptions<mongoose.DefaultSchemaOptions>> & mongoose.FlatRecord<UiItemDocument> & Required<{
|
|
14
|
+
_id: mongoose.Types.ObjectId;
|
|
15
|
+
}> & {
|
|
16
|
+
__v: number;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const UiItemModel: Model<UiItemDocument, {}, {}, {}, Document<unknown, {}, UiItemDocument, {}, {}> & UiItemDocument & Required<{
|
|
19
|
+
_id: mongoose.Types.ObjectId;
|
|
20
|
+
}> & {
|
|
21
|
+
__v: number;
|
|
22
|
+
}, any>;
|
|
23
|
+
//# sourceMappingURL=ui-item.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-item.schema.d.ts","sourceRoot":"","sources":["../../../schemas/mongo/ui-item.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AACrC,OAAO,EAAkB,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAK1D,MAAM,WAAW,cAAe,SAAQ,QAAQ,EAAE,MAAM;IACtD,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;CACpC;AAGD,eAAO,MAAM,YAAY;;;;;;;;EAOD,CAAC;AAiBzB,eAAO,MAAM,WAAW;;;;OAAyD,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.UiItemModel = exports.UiItemSchema = void 0;
|
|
37
|
+
const mongoose_1 = require("mongoose");
|
|
38
|
+
const mongoose = __importStar(require("mongoose"));
|
|
39
|
+
const models_1 = require("../../models");
|
|
40
|
+
// 定義 UiItem 的 Schema
|
|
41
|
+
exports.UiItemSchema = new mongoose_1.Schema({
|
|
42
|
+
id: { type: String, required: true, immutable: true }, // 使用 UUID 作為 id
|
|
43
|
+
userId: { type: String, required: true }, // 使用者 ID,參考 UserProfile.id
|
|
44
|
+
entityType: { type: String, enum: Object.values(models_1.EntityTypeEnum), required: true }, // 實體類型
|
|
45
|
+
entityId: { type: String, required: true }, // 實體 ID
|
|
46
|
+
pinned: { type: Boolean, default: false }, // 是否釘選
|
|
47
|
+
label: { type: String, required: false }, // 標籤,可選
|
|
48
|
+
}, { timestamps: true });
|
|
49
|
+
// 建立複合索引以提升查詢效能
|
|
50
|
+
exports.UiItemSchema.index({ userId: 1, entityType: 1, entityId: 1 }, { unique: true }); // 確保同一使用者對同一實體只能有一個 UI 項目
|
|
51
|
+
exports.UiItemSchema.index({ userId: 1, pinned: -1 }); // 支援按使用者查詢釘選項目
|
|
52
|
+
// 虛擬欄位:關聯使用者資料
|
|
53
|
+
exports.UiItemSchema.virtual('_user', {
|
|
54
|
+
ref: 'UserProfile',
|
|
55
|
+
localField: 'userId',
|
|
56
|
+
foreignField: 'id',
|
|
57
|
+
justOne: true // 一個 UI 項目對應一個使用者
|
|
58
|
+
});
|
|
59
|
+
// 創建 UiItem 模型
|
|
60
|
+
exports.UiItemModel = mongoose.model('UiItem', exports.UiItemSchema);
|
|
61
|
+
//# sourceMappingURL=ui-item.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ui-item.schema.js","sourceRoot":"","sources":["../../../schemas/mongo/ui-item.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAmD;AACnD,mDAAqC;AACrC,yCAAsD;AAYtD,qBAAqB;AACR,QAAA,YAAY,GAAG,IAAI,iBAAM,CAAiB;IACrD,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,gBAAgB;IACvE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,2BAA2B;IACrE,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,uBAAc,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,OAAO;IAC1F,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,QAAQ;IACpD,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,OAAO;IAClD,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,QAAQ;CACnD,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;AAEzB,gBAAgB;AAChB,oBAAY,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,0BAA0B;AAC3G,oBAAY,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,eAAe;AAE9D,eAAe;AACf,oBAAY,CAAC,OAAO,CAAC,OAAO,EAAE;IAC5B,GAAG,EAAE,aAAa;IAClB,UAAU,EAAE,QAAQ;IACpB,YAAY,EAAE,IAAI;IAClB,OAAO,EAAE,IAAI,CAAC,kBAAkB;CACjC,CAAC,CAAC;AAIH,eAAe;AACF,QAAA,WAAW,GAAG,QAAQ,CAAC,KAAK,CAAiB,QAAQ,EAAE,oBAAY,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PermissionDocument } from './permission-mongo.schema';
|
|
2
|
+
import { Schema, Document } from 'mongoose';
|
|
3
|
+
import { RoleDocument } from './role-mongo.schema';
|
|
4
|
+
import { UserProfile } from '../../models';
|
|
5
|
+
export interface UserProfileDocument extends Document, UserProfile {
|
|
6
|
+
id: string;
|
|
7
|
+
_role_list: RoleDocument[];
|
|
8
|
+
_permission_list: PermissionDocument[];
|
|
9
|
+
}
|
|
10
|
+
export declare const UserProfileSchema: Schema<UserProfileDocument, import("mongoose").Model<UserProfileDocument, any, any, any, Document<unknown, any, UserProfileDocument, any, {}> & UserProfileDocument & Required<{
|
|
11
|
+
_id: import("mongoose").Types.ObjectId;
|
|
12
|
+
}> & {
|
|
13
|
+
__v: number;
|
|
14
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, UserProfileDocument, Document<unknown, {}, import("mongoose").FlatRecord<UserProfileDocument>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<UserProfileDocument> & Required<{
|
|
15
|
+
_id: import("mongoose").Types.ObjectId;
|
|
16
|
+
}> & {
|
|
17
|
+
__v: number;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const UserProfileModel: import("mongoose").Model<UserProfileDocument, {}, {}, {}, Document<unknown, {}, UserProfileDocument, {}, {}> & UserProfileDocument & Required<{
|
|
20
|
+
_id: import("mongoose").Types.ObjectId;
|
|
21
|
+
}> & {
|
|
22
|
+
__v: number;
|
|
23
|
+
}, any>;
|
|
24
|
+
//# sourceMappingURL=user-mongo.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-mongo.schema.d.ts","sourceRoot":"","sources":["../../../schemas/mongo/user-mongo.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAS,QAAQ,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAQ3C,MAAM,WAAW,mBAAoB,SAAQ,QAAQ,EAAE,WAAW;IAChE,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,YAAY,EAAE,CAAC;IAC3B,gBAAgB,EAAE,kBAAkB,EAAE,CAAC;CACxC;AAGD,eAAO,MAAM,iBAAiB;;;;;;;;EAaN,CAAC;AAiBzB,eAAO,MAAM,gBAAgB;;;;OAA+D,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserProfileModel = exports.UserProfileSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
// 定義 UserProfile 的 Schema
|
|
6
|
+
exports.UserProfileSchema = new mongoose_1.Schema({
|
|
7
|
+
id: { type: String, required: true, immutable: true }, // 使用 UUID 作為 id
|
|
8
|
+
name: { type: String, required: false },
|
|
9
|
+
roleId_list: [{ type: String, ref: 'Role' }],
|
|
10
|
+
permissionId_list: [{ type: String, ref: 'Permission' }],
|
|
11
|
+
email: { type: String, required: false, index: true },
|
|
12
|
+
phone: { type: String, required: false, index: true },
|
|
13
|
+
address: { type: String, required: false, index: true },
|
|
14
|
+
avatarUrl: { type: String, required: false },
|
|
15
|
+
account: { type: String, required: true, index: true, unique: true },
|
|
16
|
+
department: { type: String, required: false },
|
|
17
|
+
organizationUnit: { type: String, required: false },
|
|
18
|
+
description: { type: String, required: false },
|
|
19
|
+
}, { timestamps: true });
|
|
20
|
+
exports.UserProfileSchema.virtual('_permission_list', {
|
|
21
|
+
ref: 'Permission',
|
|
22
|
+
localField: 'permissionId_list',
|
|
23
|
+
foreignField: 'id',
|
|
24
|
+
justOne: false
|
|
25
|
+
});
|
|
26
|
+
exports.UserProfileSchema.virtual('_role_list', {
|
|
27
|
+
ref: 'Role',
|
|
28
|
+
localField: 'roleId_list',
|
|
29
|
+
foreignField: 'id',
|
|
30
|
+
justOne: false
|
|
31
|
+
});
|
|
32
|
+
// // 創建 UserProfile 模型
|
|
33
|
+
exports.UserProfileModel = (0, mongoose_1.model)('UserProfile', exports.UserProfileSchema);
|
|
34
|
+
//# sourceMappingURL=user-mongo.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-mongo.schema.js","sourceRoot":"","sources":["../../../schemas/mongo/user-mongo.schema.ts"],"names":[],"mappings":";;;AACA,uCAAmD;AAgBnD,0BAA0B;AACb,QAAA,iBAAiB,GAAG,IAAI,iBAAM,CAAsB;IAC/D,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,gBAAgB;IACvE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE;IACvC,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC;IAC5C,iBAAiB,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,YAAY,EAAE,CAAC;IACxD,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE;IACrD,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE;IACrD,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE;IACvD,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE;IAC5C,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;IACpE,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE;IAC7C,gBAAgB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE;IACnD,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE;CAC/C,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;AAEzB,yBAAiB,CAAC,OAAO,CAAC,kBAAkB,EAAE;IAC5C,GAAG,EAAE,YAAY;IACjB,UAAU,EAAE,mBAAmB;IAC/B,YAAY,EAAE,IAAI;IAClB,OAAO,EAAE,KAAK;CACf,CAAC,CAAC;AAEH,yBAAiB,CAAC,OAAO,CAAC,YAAY,EAAE;IACtC,GAAG,EAAE,MAAM;IACX,UAAU,EAAE,aAAa;IACzB,YAAY,EAAE,IAAI;IAClB,OAAO,EAAE,KAAK;CACf,CAAC,CAAC;AAEH,uBAAuB;AACV,QAAA,gBAAgB,GAAG,IAAA,gBAAK,EAAsB,aAAa,EAAE,yBAAiB,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@youjunhuang/entity-core",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "tsc",
|
|
11
|
+
"clean": "rm -rf dist",
|
|
12
|
+
"prebuild": "pnpm run clean",
|
|
13
|
+
"prepublishOnly": "pnpm run build",
|
|
14
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [],
|
|
17
|
+
"author": "",
|
|
18
|
+
"license": "ISC",
|
|
19
|
+
"description": "",
|
|
20
|
+
"packageManager": "pnpm@10.3.0+sha512.ee592eda8815a8a293c206bb0917c4bb0ff274c50def7cbc17be05ec641fc2d1b02490ce660061356bd0d126a4d7eb2ec8830e6959fb8a447571c631d5a2442d",
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@types/uuid": "^10.0.0",
|
|
23
|
+
"typescript": "^5.8.2"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@nestjs/common": "^11.0.11",
|
|
27
|
+
"@nestjs/core": "^11.0.11",
|
|
28
|
+
"@nestjs/mongoose": "^11.0.1",
|
|
29
|
+
"@nestjs/typeorm": "^11.0.0",
|
|
30
|
+
"mongodb": "^6.14.1",
|
|
31
|
+
"typeorm": "^0.3.21",
|
|
32
|
+
"uuid": "^11.1.0"
|
|
33
|
+
}
|
|
34
|
+
}
|