Skip to content

Commit

Permalink
feat: update version
Browse files Browse the repository at this point in the history
  • Loading branch information
Adson Gomes Oliveira committed Jan 31, 2025
1 parent db427df commit f5cb774
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tablerise/database-management",
"version": "5.3.4",
"version": "5.3.5",
"description": "A library to manage the project database",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
10 changes: 9 additions & 1 deletion src/interfaces/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,16 @@ export interface SecretQuestion {
answer: string;
}

export interface GameInfoCampaigns {
campaignId: string;
role: string;
title: string;
description: string;
cover?: string;
}

export interface GameInfo {
campaigns: string[];
campaigns: GameInfoCampaigns[];
characters: string[];
badges: string[];
bannedFromCampaigns: string[];
Expand Down
14 changes: 12 additions & 2 deletions src/models/user/UserDetailModel.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
import mongoose, { Schema } from 'mongoose';
import MongoModel from '../MongoModel';
import { GameInfo, SecretQuestion, UserDetail } from '../../interfaces/User';
import { GameInfo, GameInfoCampaigns, SecretQuestion, UserDetail } from '../../interfaces/User';
import newUUID from '../../helpers/newUUID';

const gameInfoCampaignsMongooseSchema = new Schema<GameInfoCampaigns>(
{
campaignId: { type: String, required: true },
role: { type: String, required: true },
title: { type: String, required: true },
description: { type: String, required: true },
cover: { type: String },
}
)

const gameInfoMongooseSchema = new Schema<GameInfo>(
{
campaigns: { type: [String], required: true },
campaigns: { type: [gameInfoCampaignsMongooseSchema], required: true },
characters: { type: [String], required: true },
badges: { type: [String], required: true },
bannedFromCampaigns: { type: [String], required: true },
Expand Down

0 comments on commit f5cb774

Please sign in to comment.