@aldb2b/common 1.0.1034 → 1.0.1035

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.
@@ -51,6 +51,9 @@
51
51
  import { Schema } from 'mongoose';
52
52
  import { CustomModel } from '../../../../../db/CustomModel';
53
53
  import { EventProfileStatus } from '../../../../../enums/event-profile-status.enum';
54
+ import { ProfileItemType } from "../../../../../enums/profile-item-type.enum";
55
+ import { ProfileItemCustomType } from "../../../../../enums/profile-item-custom-type.enum";
56
+ import { CustomTypePossibleValue } from "../../../companies";
54
57
  export type CompanyProfileItemModel = CustomModel<CompanyProfileItem>;
55
58
  export declare class CompanyProfileItem {
56
59
  _id: string;
@@ -60,6 +63,9 @@ export declare class CompanyProfileItem {
60
63
  registrationStatus: EventProfileStatus;
61
64
  profileStatus: EventProfileStatus;
62
65
  filterStatus: EventProfileStatus;
66
+ profileItemType: ProfileItemType;
67
+ customType: ProfileItemCustomType;
68
+ customTypePossibleValues: CustomTypePossibleValue[];
63
69
  createdAt: Date;
64
70
  updatedAt: Date;
65
71
  }
@@ -3,6 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CompanyProfileItemSchema = exports.CompanyProfileItem = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
5
  const event_profile_status_enum_1 = require("../../../../../enums/event-profile-status.enum");
6
+ const profile_item_type_enum_1 = require("../../../../../enums/profile-item-type.enum");
7
+ const profile_item_custom_type_enum_1 = require("../../../../../enums/profile-item-custom-type.enum");
8
+ const companies_1 = require("../../../companies");
6
9
  class CompanyProfileItem {
7
10
  }
8
11
  exports.CompanyProfileItem = CompanyProfileItem;
@@ -33,6 +36,30 @@ exports.CompanyProfileItemSchema = new mongoose_1.Schema({
33
36
  enum: Object.values(event_profile_status_enum_1.EventProfileStatus),
34
37
  default: event_profile_status_enum_1.EventProfileStatus.DISABLE,
35
38
  },
39
+ profileItemType: {
40
+ type: String,
41
+ enum: profile_item_type_enum_1.ProfileItemType,
42
+ required: true,
43
+ default: profile_item_type_enum_1.ProfileItemType.MAIN,
44
+ },
45
+ customType: {
46
+ type: String,
47
+ enum: profile_item_custom_type_enum_1.ProfileItemCustomType,
48
+ required: function () {
49
+ return this.profileItemType === profile_item_type_enum_1.ProfileItemType.CUSTOM;
50
+ },
51
+ },
52
+ customTypePossibleValues: {
53
+ type: [companies_1.CustomTypePossibleValue],
54
+ required: function () {
55
+ return (this.profileItemType === profile_item_type_enum_1.ProfileItemType.CUSTOM &&
56
+ [
57
+ profile_item_custom_type_enum_1.ProfileItemCustomType.CHECK_BOXS,
58
+ profile_item_custom_type_enum_1.ProfileItemCustomType.RADIO_BUTTONS,
59
+ ].indexOf(this.customType) !== -1);
60
+ },
61
+ default: [],
62
+ },
36
63
  createdAt: { type: Date, required: true, default: Date.now },
37
64
  updatedAt: { type: Date, required: true, default: Date.now },
38
65
  });
@@ -1 +1 @@
1
- {"version":3,"file":"company-profile-item.entity.js","sourceRoot":"","sources":["../../../../../../src/entities/models/events/entities/eventProfile/company-profile-item.entity.ts"],"names":[],"mappings":";;;AAAA,uCAAkC;AAElC,8FAAoF;AAIpF,MAAa,kBAAkB;CAU9B;AAVD,gDAUC;AACY,QAAA,wBAAwB,GAAG,IAAI,iBAAM,CAGhD;IACA,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;IAClD,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE;IACnC,SAAS,EAAE;QACT,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,8CAAkB,CAAC;QACvC,OAAO,EAAE,8CAAkB,CAAC,OAAO;KACpC;IACD,kBAAkB,EAAE;QAClB,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,8CAAkB,CAAC;QACvC,OAAO,EAAE,8CAAkB,CAAC,OAAO;KACpC;IACD,aAAa,EAAE;QACb,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,8CAAkB,CAAC;QACvC,OAAO,EAAE,8CAAkB,CAAC,OAAO;KACpC;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,8CAAkB,CAAC;QACvC,OAAO,EAAE,8CAAkB,CAAC,OAAO;KACpC;IACD,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE;IAC5D,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE;CAC7D,CAAC,CAAC"}
1
+ {"version":3,"file":"company-profile-item.entity.js","sourceRoot":"","sources":["../../../../../../src/entities/models/events/entities/eventProfile/company-profile-item.entity.ts"],"names":[],"mappings":";;;AAAA,uCAAkC;AAElC,8FAAoF;AACpF,wFAA4E;AAC5E,sGAAyF;AACzF,kDAA2D;AAI3D,MAAa,kBAAkB;CAa9B;AAbD,gDAaC;AACY,QAAA,wBAAwB,GAAG,IAAI,iBAAM,CAGhD;IACA,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;IAClD,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE;IACnC,SAAS,EAAE;QACT,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,8CAAkB,CAAC;QACvC,OAAO,EAAE,8CAAkB,CAAC,OAA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