jp.db.schemas 1.0.10 → 1.0.12
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/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/schemas/article.schema.d.ts +21 -0
- package/dist/schemas/article.schema.d.ts.map +1 -0
- package/dist/schemas/article.schema.js +53 -0
- package/dist/schemas/article.schema.js.map +1 -0
- package/package.json +1 -1
- package/src/index.ts +5 -0
- package/src/schemas/article.schema.ts +34 -0
package/dist/index.d.ts
CHANGED
|
@@ -24,6 +24,8 @@ import { Admin, AdminSchema } from './schemas/admin.schema';
|
|
|
24
24
|
import type { AdminDocument } from './schemas/admin.schema';
|
|
25
25
|
import { Room, RoomSchema } from './schemas/rooms.schema';
|
|
26
26
|
import type { RoomDocument } from './schemas/rooms.schema';
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
import { Article, ArticleSchema } from './schemas/article.schema';
|
|
28
|
+
import type { ArticleDocument } from './schemas/article.schema';
|
|
29
|
+
export type { UserDocument, FBUserDocument, GoogleUserDocument, OKUserDocument, TGUserDocument, VKUserDocument, YAUserDocument, PurchaseDocument, ComplainDocument, NotificationDocument, ScheduledTournamentDocument, AdminDocument, RoomDocument, ArticleDocument, };
|
|
30
|
+
export { User, UserSchema, FBUser, FBUserSchema, GoogleUser, GoogleUserSchema, OKUser, OKUserSchema, TGUser, TGUserSchema, VKUser, VKUserSchema, YAUser, YAUserSchema, Purchase, PurchaseSchema, Complain, ComplainSchema, Notification, NotificationSchema, ScheduledTournament, ScheduledTournamentSchema, Admin, AdminSchema, Room, RoomSchema, Article, ArticleSchema, };
|
|
29
31
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,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EACN,YAAY,EACZ,MAAM,EACN,YAAY,EACZ,QAAQ,EACR,cAAc,EACd,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,EACzB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,UAAU,EACV,OAAO,EACP,aAAa,GAChB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RoomSchema = exports.Room = exports.AdminSchema = exports.Admin = exports.ScheduledTournamentSchema = exports.ScheduledTournament = exports.NotificationSchema = exports.Notification = exports.ComplainSchema = exports.Complain = exports.PurchaseSchema = exports.Purchase = exports.YAUserSchema = exports.YAUser = exports.VKUserSchema = exports.VKUser = exports.TGUserSchema = exports.TGUser = exports.OKUserSchema = exports.OKUser = exports.GoogleUserSchema = exports.GoogleUser = exports.FBUserSchema = exports.FBUser = exports.UserSchema = exports.User = void 0;
|
|
3
|
+
exports.ArticleSchema = exports.Article = exports.RoomSchema = exports.Room = exports.AdminSchema = exports.Admin = exports.ScheduledTournamentSchema = exports.ScheduledTournament = exports.NotificationSchema = exports.Notification = exports.ComplainSchema = exports.Complain = exports.PurchaseSchema = exports.Purchase = exports.YAUserSchema = exports.YAUser = exports.VKUserSchema = exports.VKUser = exports.TGUserSchema = exports.TGUser = exports.OKUserSchema = exports.OKUser = exports.GoogleUserSchema = exports.GoogleUser = exports.FBUserSchema = exports.FBUser = exports.UserSchema = exports.User = void 0;
|
|
4
4
|
const user_schema_1 = require("./schemas/user.schema");
|
|
5
5
|
Object.defineProperty(exports, "User", { enumerable: true, get: function () { return user_schema_1.User; } });
|
|
6
6
|
Object.defineProperty(exports, "UserSchema", { enumerable: true, get: function () { return user_schema_1.UserSchema; } });
|
|
@@ -40,4 +40,7 @@ Object.defineProperty(exports, "AdminSchema", { enumerable: true, get: function
|
|
|
40
40
|
const rooms_schema_1 = require("./schemas/rooms.schema");
|
|
41
41
|
Object.defineProperty(exports, "Room", { enumerable: true, get: function () { return rooms_schema_1.Room; } });
|
|
42
42
|
Object.defineProperty(exports, "RoomSchema", { enumerable: true, get: function () { return rooms_schema_1.RoomSchema; } });
|
|
43
|
+
const article_schema_1 = require("./schemas/article.schema");
|
|
44
|
+
Object.defineProperty(exports, "Article", { enumerable: true, get: function () { return article_schema_1.Article; } });
|
|
45
|
+
Object.defineProperty(exports, "ArticleSchema", { enumerable: true, get: function () { return article_schema_1.ArticleSchema; } });
|
|
43
46
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,uDAAyD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,uDAAyD;AA+CrD,qFA/CK,kBAAI,OA+CL;AACJ,2FAhDW,wBAAU,OAgDX;AA9Cd,6DAAgE;AA+C5D,uFA/CK,uBAAM,OA+CL;AACN,6FAhDa,6BAAY,OAgDb;AA9ChB,qEAA4E;AA+CxE,2FA/CK,+BAAU,OA+CL;AACV,iGAhDiB,qCAAgB,OAgDjB;AA9CpB,6DAAgE;AA+C5D,uFA/CK,uBAAM,OA+CL;AACN,6FAhDa,6BAAY,OAgDb;AA9ChB,6DAAgE;AA+C5D,uFA/CK,uBAAM,OA+CL;AACN,6FAhDa,6BAAY,OAgDb;AA9ChB,6DAAgE;AA+C5D,uFA/CK,uBAAM,OA+CL;AACN,6FAhDa,6BAAY,OAgDb;AA9ChB,6DAAgE;AA+C5D,uFA/CK,uBAAM,OA+CL;AACN,6FAhDa,6BAAY,OAgDb;AA9ChB,+DAAqE;AA+CjE,yFA/CK,0BAAQ,OA+CL;AACR,+FAhDe,gCAAc,OAgDf;AA9ClB,+DAAqE;AA+CjE,yFA/CK,0BAAQ,OA+CL;AACR,+FAhDe,gCAAc,OAgDf;AA9ClB,uEAAiF;AA+C7E,6FA/CK,kCAAY,OA+CL;AACZ,mGAhDmB,wCAAkB,OAgDnB;AA9CtB,uFAAuG;AA+CnG,oGA/CK,iDAAmB,OA+CL;AACnB,0GAhD0B,uDAAyB,OAgD1B;AA9C7B,yDAA4D;AA+CxD,sFA/CK,oBAAK,OA+CL;AACL,4FAhDY,0BAAW,OAgDZ;AA9Cf,yDAA0D;AA+CtD,qFA/CK,mBAAI,OA+CL;AACJ,2FAhDW,yBAAU,OAgDX;AA9Cd,6DAAkE;AA+C9D,wFA/CK,wBAAO,OA+CL;AACP,8FAhDc,8BAAa,OAgDd"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Document, HydratedDocument } from 'mongoose';
|
|
2
|
+
export type ArticleDocument = HydratedDocument<Article>;
|
|
3
|
+
export declare class Article {
|
|
4
|
+
readonly articleId: string;
|
|
5
|
+
title: string;
|
|
6
|
+
titleEn: string;
|
|
7
|
+
text: string;
|
|
8
|
+
textEn: string;
|
|
9
|
+
cover: string;
|
|
10
|
+
createDate: Date;
|
|
11
|
+
}
|
|
12
|
+
export declare const ArticleSchema: import("mongoose").Schema<Article, import("mongoose").Model<Article, any, any, any, Document<unknown, any, Article, any> & Article & {
|
|
13
|
+
_id: import("mongoose").Types.ObjectId;
|
|
14
|
+
} & {
|
|
15
|
+
__v: number;
|
|
16
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Article, Document<unknown, {}, import("mongoose").FlatRecord<Article>, {}> & import("mongoose").FlatRecord<Article> & {
|
|
17
|
+
_id: import("mongoose").Types.ObjectId;
|
|
18
|
+
} & {
|
|
19
|
+
__v: number;
|
|
20
|
+
}>;
|
|
21
|
+
//# sourceMappingURL=article.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"article.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/article.schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEtD,MAAM,MAAM,eAAe,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;AAExD,qBACa,OAAO;IAMhB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAG3B,KAAK,EAAE,MAAM,CAAC;IAGd,OAAO,EAAE,MAAM,CAAC;IAGhB,IAAI,EAAE,MAAM,CAAC;IAGb,MAAM,EAAE,MAAM,CAAC;IAGf,KAAK,EAAE,MAAM,CAAC;IAGd,UAAU,EAAE,IAAI,CAAC;CACpB;AAED,eAAO,MAAM,aAAa;;;;;;;;EAAwC,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ArticleSchema = exports.Article = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
let Article = class Article {
|
|
15
|
+
};
|
|
16
|
+
exports.Article = Article;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, mongoose_1.Virtual)({
|
|
19
|
+
get: function () {
|
|
20
|
+
return this.id;
|
|
21
|
+
},
|
|
22
|
+
}),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], Article.prototype, "articleId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, mongoose_1.Prop)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], Article.prototype, "title", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, mongoose_1.Prop)(),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], Article.prototype, "titleEn", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, mongoose_1.Prop)(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], Article.prototype, "text", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, mongoose_1.Prop)(),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], Article.prototype, "textEn", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, mongoose_1.Prop)(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], Article.prototype, "cover", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, mongoose_1.Prop)(),
|
|
47
|
+
__metadata("design:type", Date)
|
|
48
|
+
], Article.prototype, "createDate", void 0);
|
|
49
|
+
exports.Article = Article = __decorate([
|
|
50
|
+
(0, mongoose_1.Schema)()
|
|
51
|
+
], Article);
|
|
52
|
+
exports.ArticleSchema = mongoose_1.SchemaFactory.createForClass(Article);
|
|
53
|
+
//# sourceMappingURL=article.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"article.schema.js","sourceRoot":"","sources":["../../src/schemas/article.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAAwE;AAMjE,IAAM,OAAO,GAAb,MAAM,OAAO;CAyBnB,CAAA;AAzBY,0BAAO;AAMP;IALR,IAAA,kBAAO,EAAC;QACL,GAAG,EAAE;YACD,OAAO,IAAI,CAAC,EAAE,CAAC;QACnB,CAAC;KACJ,CAAC;;0CACyB;AAG3B;IADC,IAAA,eAAI,GAAE;;sCACO;AAGd;IADC,IAAA,eAAI,GAAE;;wCACS;AAGhB;IADC,IAAA,eAAI,GAAE;;qCACM;AAGb;IADC,IAAA,eAAI,GAAE;;uCACQ;AAGf;IADC,IAAA,eAAI,GAAE;;sCACO;AAGd;IADC,IAAA,eAAI,GAAE;8BACK,IAAI;2CAAC;kBAxBR,OAAO;IADnB,IAAA,iBAAM,GAAE;GACI,OAAO,CAyBnB;AAEY,QAAA,aAAa,GAAG,wBAAa,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -24,6 +24,8 @@ import { Admin, AdminSchema } from './schemas/admin.schema';
|
|
|
24
24
|
import type { AdminDocument } from './schemas/admin.schema';
|
|
25
25
|
import { Room, RoomSchema } from './schemas/rooms.schema';
|
|
26
26
|
import type { RoomDocument } from './schemas/rooms.schema';
|
|
27
|
+
import { Article, ArticleSchema } from './schemas/article.schema';
|
|
28
|
+
import type { ArticleDocument } from './schemas/article.schema';
|
|
27
29
|
|
|
28
30
|
export type {
|
|
29
31
|
UserDocument,
|
|
@@ -39,6 +41,7 @@ export type {
|
|
|
39
41
|
ScheduledTournamentDocument,
|
|
40
42
|
AdminDocument,
|
|
41
43
|
RoomDocument,
|
|
44
|
+
ArticleDocument,
|
|
42
45
|
}
|
|
43
46
|
|
|
44
47
|
export {
|
|
@@ -68,4 +71,6 @@ export {
|
|
|
68
71
|
AdminSchema,
|
|
69
72
|
Room,
|
|
70
73
|
RoomSchema,
|
|
74
|
+
Article,
|
|
75
|
+
ArticleSchema,
|
|
71
76
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Prop, Schema, SchemaFactory, Virtual } from '@nestjs/mongoose';
|
|
2
|
+
import { Document, HydratedDocument } from 'mongoose';
|
|
3
|
+
|
|
4
|
+
export type ArticleDocument = HydratedDocument<Article>;
|
|
5
|
+
|
|
6
|
+
@Schema()
|
|
7
|
+
export class Article {
|
|
8
|
+
@Virtual({
|
|
9
|
+
get: function (this: Document) {
|
|
10
|
+
return this.id;
|
|
11
|
+
},
|
|
12
|
+
})
|
|
13
|
+
readonly articleId: string;
|
|
14
|
+
|
|
15
|
+
@Prop()
|
|
16
|
+
title: string;
|
|
17
|
+
|
|
18
|
+
@Prop()
|
|
19
|
+
titleEn: string;
|
|
20
|
+
|
|
21
|
+
@Prop()
|
|
22
|
+
text: string;
|
|
23
|
+
|
|
24
|
+
@Prop()
|
|
25
|
+
textEn: string;
|
|
26
|
+
|
|
27
|
+
@Prop()
|
|
28
|
+
cover: string;
|
|
29
|
+
|
|
30
|
+
@Prop()
|
|
31
|
+
createDate: Date;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const ArticleSchema = SchemaFactory.createForClass(Article);
|