c2-desafiox 1.0.122 → 1.0.123

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.
@@ -5,10 +5,15 @@ import { IChampionshipRound } from "./ChampionshipRound";
5
5
  import { IFile } from "./File";
6
6
  import { ChallengeRoundStatus } from "../types/ChallengeRoundStatus";
7
7
  import { ITicket } from "./Ticket";
8
+ import { IAccount } from "./Account";
8
9
  export declare enum ChallengeType {
9
10
  SURVIVAL = "SURVIVAL",
10
11
  RANKING = "RANKING"
11
12
  }
13
+ export declare enum ChallengeVisibility {
14
+ PUBLIC = "PUBLIC",
15
+ PRIVATE = "PRIVATE"
16
+ }
12
17
  export interface IChallengePricing {
13
18
  initDateTime: Date;
14
19
  endDateTime: Date;
@@ -47,6 +52,8 @@ export interface IChallenge {
47
52
  updatedAtDateTime: Date;
48
53
  status: ChallengeStatus;
49
54
  type: ChallengeType;
55
+ visibility: ChallengeVisibility;
56
+ owner: Types.ObjectId | IAccount;
50
57
  pricing: IChallengePricing[];
51
58
  }
52
59
  export declare const ChallengePricingSchema: Schema<IChallengePricing, import("mongoose").Model<IChallengePricing, any, any, any, import("mongoose").Document<unknown, any, IChallengePricing, any> & IChallengePricing & {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ChallengeSchema = exports.ChallengePricingSchema = exports.ChallengeType = void 0;
3
+ exports.ChallengeSchema = exports.ChallengePricingSchema = exports.ChallengeVisibility = exports.ChallengeType = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
5
  const ChallengeStatus_1 = require("../types/ChallengeStatus");
6
6
  const File_1 = require("./File");
@@ -10,6 +10,11 @@ var ChallengeType;
10
10
  ChallengeType["SURVIVAL"] = "SURVIVAL";
11
11
  ChallengeType["RANKING"] = "RANKING";
12
12
  })(ChallengeType || (exports.ChallengeType = ChallengeType = {}));
13
+ var ChallengeVisibility;
14
+ (function (ChallengeVisibility) {
15
+ ChallengeVisibility["PUBLIC"] = "PUBLIC";
16
+ ChallengeVisibility["PRIVATE"] = "PRIVATE";
17
+ })(ChallengeVisibility || (exports.ChallengeVisibility = ChallengeVisibility = {}));
13
18
  exports.ChallengePricingSchema = new mongoose_1.Schema({
14
19
  initDateTime: { type: Date, required: true },
15
20
  endDateTime: { type: Date, required: true },
@@ -42,6 +47,8 @@ exports.ChallengeSchema = new mongoose_1.Schema({
42
47
  totalTicketsInGamming: { type: Number, required: false },
43
48
  type: { type: String, enum: ChallengeType, required: true, default: ChallengeType.SURVIVAL },
44
49
  pricing: { type: [exports.ChallengePricingSchema], required: false },
50
+ visibility: { type: String, enum: ChallengeVisibility, required: true, default: ChallengeVisibility.PUBLIC },
51
+ owner: { type: mongoose_1.Schema.Types.ObjectId, ref: "account", required: false },
45
52
  }, {
46
53
  timestamps: {
47
54
  createdAt: "createdAtDateTime",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c2-desafiox",
3
- "version": "1.0.122",
3
+ "version": "1.0.123",
4
4
  "description": "Modelagem TypeScript/Mongoose para o jogo Escalada X (times, campeonatos, fases, rodadas, confrontos, desafios)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",