jp.db.schemas 1.0.17 → 1.0.19
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 +18 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -1
- package/dist/index.js.map +1 -1
- package/dist/repositories/admin.repository.d.ts +9 -0
- package/dist/repositories/admin.repository.d.ts.map +1 -0
- package/dist/repositories/admin.repository.js +41 -0
- package/dist/repositories/admin.repository.js.map +1 -0
- package/dist/repositories/article.repository.d.ts +10 -0
- package/dist/repositories/article.repository.d.ts.map +1 -0
- package/dist/repositories/article.repository.js +50 -0
- package/dist/repositories/article.repository.js.map +1 -0
- package/dist/repositories/banners.repository.d.ts +15 -0
- package/dist/repositories/banners.repository.d.ts.map +1 -0
- package/dist/repositories/banners.repository.js +60 -0
- package/dist/repositories/banners.repository.js.map +1 -0
- package/dist/repositories/complains.repository.d.ts +11 -0
- package/dist/repositories/complains.repository.d.ts.map +1 -0
- package/dist/repositories/complains.repository.js +44 -0
- package/dist/repositories/complains.repository.js.map +1 -0
- package/dist/repositories/index.d.ts +11 -0
- package/dist/repositories/index.d.ts.map +1 -0
- package/dist/repositories/index.js +22 -0
- package/dist/repositories/index.js.map +1 -0
- package/dist/repositories/notification.repository.d.ts +15 -0
- package/dist/repositories/notification.repository.d.ts.map +1 -0
- package/dist/repositories/notification.repository.js +60 -0
- package/dist/repositories/notification.repository.js.map +1 -0
- package/dist/repositories/products.repository.d.ts +9 -0
- package/dist/repositories/products.repository.d.ts.map +1 -0
- package/dist/repositories/products.repository.js +46 -0
- package/dist/repositories/products.repository.js.map +1 -0
- package/dist/repositories/scheduled-tournaments.repository.d.ts +11 -0
- package/dist/repositories/scheduled-tournaments.repository.d.ts.map +1 -0
- package/dist/repositories/scheduled-tournaments.repository.js +44 -0
- package/dist/repositories/scheduled-tournaments.repository.js.map +1 -0
- package/dist/repositories/servers.repository.d.ts +8 -0
- package/dist/repositories/servers.repository.d.ts.map +1 -0
- package/dist/repositories/servers.repository.js +36 -0
- package/dist/repositories/servers.repository.js.map +1 -0
- package/dist/repositories/users.repository.d.ts +15 -0
- package/dist/repositories/users.repository.d.ts.map +1 -0
- package/dist/repositories/users.repository.js +70 -0
- package/dist/repositories/users.repository.js.map +1 -0
- package/dist/schemas/achievement.schema.d.ts +23 -0
- package/dist/schemas/achievement.schema.d.ts.map +1 -0
- package/dist/schemas/achievement.schema.js +61 -0
- package/dist/schemas/achievement.schema.js.map +1 -0
- package/dist/schemas/banner.schema.d.ts +1 -0
- package/dist/schemas/banner.schema.d.ts.map +1 -1
- package/dist/schemas/banner.schema.js +4 -0
- package/dist/schemas/banner.schema.js.map +1 -1
- package/dist/schemas/channel_message.schema.d.ts +20 -0
- package/dist/schemas/channel_message.schema.d.ts.map +1 -0
- package/dist/schemas/channel_message.schema.js +49 -0
- package/dist/schemas/channel_message.schema.js.map +1 -0
- package/dist/schemas/feature.schema.d.ts +19 -0
- package/dist/schemas/feature.schema.d.ts.map +1 -0
- package/dist/schemas/feature.schema.js +45 -0
- package/dist/schemas/feature.schema.js.map +1 -0
- package/dist/schemas/notification.schema.d.ts +1 -0
- package/dist/schemas/notification.schema.d.ts.map +1 -1
- package/dist/schemas/notification.schema.js +4 -0
- package/dist/schemas/notification.schema.js.map +1 -1
- package/dist/schemas/product.schema.d.ts +50 -0
- package/dist/schemas/product.schema.d.ts.map +1 -0
- package/dist/schemas/product.schema.js +169 -0
- package/dist/schemas/product.schema.js.map +1 -0
- package/dist/schemas/purchase.schema.d.ts +1 -0
- package/dist/schemas/purchase.schema.d.ts.map +1 -1
- package/dist/schemas/purchase.schema.js +4 -0
- package/dist/schemas/purchase.schema.js.map +1 -1
- package/dist/schemas/purchase_channel.schema.d.ts +20 -0
- package/dist/schemas/purchase_channel.schema.d.ts.map +1 -0
- package/dist/schemas/purchase_channel.schema.js +49 -0
- package/dist/schemas/purchase_channel.schema.js.map +1 -0
- package/dist/schemas/rating.schema.d.ts +25 -0
- package/dist/schemas/rating.schema.d.ts.map +1 -0
- package/dist/schemas/rating.schema.js +69 -0
- package/dist/schemas/rating.schema.js.map +1 -0
- package/dist/schemas/rooms.schema.d.ts +1 -0
- package/dist/schemas/rooms.schema.d.ts.map +1 -1
- package/dist/schemas/rooms.schema.js +4 -0
- package/dist/schemas/rooms.schema.js.map +1 -1
- package/dist/schemas/scheduled_tournament.schema.d.ts +1 -0
- package/dist/schemas/scheduled_tournament.schema.d.ts.map +1 -1
- package/dist/schemas/scheduled_tournament.schema.js +4 -0
- package/dist/schemas/scheduled_tournament.schema.js.map +1 -1
- package/dist/schemas/setting.schema.d.ts +24 -0
- package/dist/schemas/setting.schema.d.ts.map +1 -0
- package/dist/schemas/setting.schema.js +65 -0
- package/dist/schemas/setting.schema.js.map +1 -0
- package/dist/utils.d.ts +2 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +7 -0
- package/dist/utils.js.map +1 -0
- package/package.json +1 -1
- package/src/index.ts +59 -0
- package/src/repositories/admin.repository.ts +23 -0
- package/src/repositories/article.repository.ts +33 -0
- package/src/repositories/banners.repository.ts +54 -0
- package/src/repositories/complains.repository.ts +30 -0
- package/src/repositories/index.ts +21 -0
- package/src/repositories/notification.repository.ts +54 -0
- package/src/repositories/products.repository.ts +29 -0
- package/src/repositories/scheduled-tournaments.repository.ts +30 -0
- package/src/repositories/servers.repository.ts +18 -0
- package/src/repositories/users.repository.ts +69 -0
- package/src/schemas/achievement.schema.ts +40 -0
- package/src/schemas/banner.schema.ts +3 -0
- package/src/schemas/channel_message.schema.ts +31 -0
- package/src/schemas/feature.schema.ts +28 -0
- package/src/schemas/notification.schema.ts +3 -0
- package/src/schemas/product.schema.ts +123 -0
- package/src/schemas/purchase.schema.ts +3 -0
- package/src/schemas/purchase_channel.schema.ts +31 -0
- package/src/schemas/rating.schema.ts +46 -0
- package/src/schemas/rooms.schema.ts +3 -0
- package/src/schemas/scheduled_tournament.schema.ts +3 -0
- package/src/schemas/setting.schema.ts +43 -0
- package/src/utils.ts +3 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Prop, Schema, SchemaFactory, Virtual } from '@nestjs/mongoose';
|
|
2
|
+
import { Document, HydratedDocument } from 'mongoose';
|
|
3
|
+
|
|
4
|
+
export type PurchaseChannelDocument = HydratedDocument<PurchaseChannel>;
|
|
5
|
+
|
|
6
|
+
@Schema()
|
|
7
|
+
export class PurchaseChannel {
|
|
8
|
+
@Virtual({
|
|
9
|
+
get: function (this: Document) {
|
|
10
|
+
return this.id;
|
|
11
|
+
},
|
|
12
|
+
})
|
|
13
|
+
readonly achievementId: string;
|
|
14
|
+
|
|
15
|
+
@Prop()
|
|
16
|
+
userId: string;
|
|
17
|
+
|
|
18
|
+
@Prop()
|
|
19
|
+
purchaseId: string;
|
|
20
|
+
|
|
21
|
+
@Prop()
|
|
22
|
+
productId: string;
|
|
23
|
+
|
|
24
|
+
@Prop()
|
|
25
|
+
channel: string;
|
|
26
|
+
|
|
27
|
+
@Prop()
|
|
28
|
+
game: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const PurchaseChannelSchema = SchemaFactory.createForClass(PurchaseChannel);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Prop, Schema, SchemaFactory, Virtual } from '@nestjs/mongoose';
|
|
2
|
+
import { Document, HydratedDocument } from 'mongoose';
|
|
3
|
+
|
|
4
|
+
export type RatingDocument = HydratedDocument<Rating>;
|
|
5
|
+
|
|
6
|
+
@Schema()
|
|
7
|
+
export class Rating {
|
|
8
|
+
@Virtual({
|
|
9
|
+
get: function (this: Document) {
|
|
10
|
+
return this.id;
|
|
11
|
+
},
|
|
12
|
+
})
|
|
13
|
+
readonly achievementId: string;
|
|
14
|
+
|
|
15
|
+
@Prop()
|
|
16
|
+
day: string;
|
|
17
|
+
|
|
18
|
+
@Prop()
|
|
19
|
+
month: string;
|
|
20
|
+
|
|
21
|
+
@Prop()
|
|
22
|
+
userId: string;
|
|
23
|
+
|
|
24
|
+
@Prop()
|
|
25
|
+
userName: string;
|
|
26
|
+
|
|
27
|
+
@Prop()
|
|
28
|
+
userAvatarUrl: string;
|
|
29
|
+
|
|
30
|
+
@Prop()
|
|
31
|
+
profit: number;
|
|
32
|
+
|
|
33
|
+
@Prop()
|
|
34
|
+
lost: number
|
|
35
|
+
|
|
36
|
+
@Prop()
|
|
37
|
+
gamesPlayed: number;
|
|
38
|
+
|
|
39
|
+
@Prop()
|
|
40
|
+
gamesWon: number;
|
|
41
|
+
|
|
42
|
+
@Prop()
|
|
43
|
+
game: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export const RatingSchema = SchemaFactory.createForClass(Rating);
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Prop, Schema, SchemaFactory, Virtual } from '@nestjs/mongoose';
|
|
2
|
+
import { Document, HydratedDocument } from 'mongoose';
|
|
3
|
+
|
|
4
|
+
export type SettingDocument = HydratedDocument<Setting>;
|
|
5
|
+
|
|
6
|
+
@Schema()
|
|
7
|
+
export class Setting {
|
|
8
|
+
@Virtual({
|
|
9
|
+
get: function (this: Document) {
|
|
10
|
+
return this.id;
|
|
11
|
+
},
|
|
12
|
+
})
|
|
13
|
+
readonly settingId: string;
|
|
14
|
+
|
|
15
|
+
@Prop()
|
|
16
|
+
type: string;
|
|
17
|
+
|
|
18
|
+
@Prop()
|
|
19
|
+
title: string;
|
|
20
|
+
|
|
21
|
+
@Prop()
|
|
22
|
+
titleEn: string;
|
|
23
|
+
|
|
24
|
+
@Prop()
|
|
25
|
+
position: number;
|
|
26
|
+
|
|
27
|
+
@Prop()
|
|
28
|
+
payd?: boolean;
|
|
29
|
+
|
|
30
|
+
@Prop()
|
|
31
|
+
code: string;
|
|
32
|
+
|
|
33
|
+
@Prop()
|
|
34
|
+
productId?: string;
|
|
35
|
+
|
|
36
|
+
@Prop()
|
|
37
|
+
premium?: boolean;
|
|
38
|
+
|
|
39
|
+
@Prop()
|
|
40
|
+
game?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const SettingSchema = SchemaFactory.createForClass(Setting);
|
package/src/utils.ts
ADDED