@duvdu-v1/duvdu 1.1.235 → 1.1.236

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.
@@ -36,6 +36,11 @@ export declare enum CopyrightContractStatus {
36
36
  rejected = "rejected",
37
37
  complaint = "complaint"
38
38
  }
39
+ export declare enum SubmitFilesStatus {
40
+ pending = "pending",
41
+ approved = "approved",
42
+ rejected = "rejected"
43
+ }
39
44
  export interface IcopyrightContract {
40
45
  id: string;
41
46
  customer: Types.ObjectId | Iuser;
@@ -68,7 +73,8 @@ export interface IcopyrightContract {
68
73
  submitFiles: {
69
74
  link: string;
70
75
  notes: string;
71
- };
76
+ status: SubmitFilesStatus;
77
+ }[];
72
78
  createdAt: Date;
73
79
  updatedAt: Date;
74
80
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CopyrightContracts = exports.CopyrightContractStatus = void 0;
3
+ exports.CopyrightContracts = exports.SubmitFilesStatus = exports.CopyrightContractStatus = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
5
  const model_names_1 = require("../types/model-names");
6
6
  var CopyrightContractStatus;
@@ -15,6 +15,12 @@ var CopyrightContractStatus;
15
15
  CopyrightContractStatus["rejected"] = "rejected";
16
16
  CopyrightContractStatus["complaint"] = "complaint";
17
17
  })(CopyrightContractStatus || (exports.CopyrightContractStatus = CopyrightContractStatus = {}));
18
+ var SubmitFilesStatus;
19
+ (function (SubmitFilesStatus) {
20
+ SubmitFilesStatus["pending"] = "pending";
21
+ SubmitFilesStatus["approved"] = "approved";
22
+ SubmitFilesStatus["rejected"] = "rejected";
23
+ })(SubmitFilesStatus || (exports.SubmitFilesStatus = SubmitFilesStatus = {}));
18
24
  exports.CopyrightContracts = (0, mongoose_1.model)(model_names_1.MODELS.copyrightContract, new mongoose_1.Schema({
19
25
  customer: { type: mongoose_1.Schema.Types.ObjectId, ref: model_names_1.MODELS.user },
20
26
  sp: { type: mongoose_1.Schema.Types.ObjectId, ref: model_names_1.MODELS.user },
@@ -35,10 +41,11 @@ exports.CopyrightContracts = (0, mongoose_1.model)(model_names_1.MODELS.copyrigh
35
41
  firstPaymentAmount: { type: Number, default: null },
36
42
  secondPaymentAmount: { type: Number, default: null },
37
43
  status: { type: String, enum: CopyrightContractStatus },
38
- submitFiles: {
39
- link: { type: String, default: null },
40
- notes: { type: String, default: null },
41
- },
44
+ submitFiles: [{
45
+ link: { type: String, default: null },
46
+ notes: { type: String, default: null },
47
+ status: { type: String, enum: SubmitFilesStatus, default: SubmitFilesStatus.pending },
48
+ }],
42
49
  rejectedBy: { type: String, enum: ['sp', 'customer'], default: null },
43
50
  paymentLink: { type: String, default: null },
44
51
  }, { collection: model_names_1.MODELS.copyrightContract, timestamps: true }));
@@ -101,11 +101,6 @@ export interface IprojectCycle {
101
101
  totalRates: number;
102
102
  };
103
103
  duration: number;
104
- submitFiles: {
105
- files: string[];
106
- url: string;
107
- note: string;
108
- };
109
104
  minBudget: number;
110
105
  maxBudget: number;
111
106
  }
@@ -75,11 +75,6 @@ exports.ProjectCycle = (0, mongoose_1.model)(model_names_1.MODELS.portfolioPost,
75
75
  isDeleted: { type: Boolean, default: false },
76
76
  rate: { ratersCounter: Number, totalRates: Number },
77
77
  duration: { type: Number, default: 0 },
78
- submitFiles: {
79
- files: [String],
80
- url: { type: String, default: null },
81
- note: { type: String, default: null },
82
- },
83
78
  minBudget: { type: Number, default: null },
84
79
  maxBudget: { type: Number, default: null },
85
80
  }, { timestamps: true, collection: model_names_1.MODELS.portfolioPost }).index({ location: '2dsphere' }));
@@ -23,6 +23,7 @@
23
23
  /// <reference types="mongoose/types/virtuals" />
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
25
  import { Types } from 'mongoose';
26
+ import { SubmitFilesStatus } from './copyright-contract.model';
26
27
  import { IprojectCycle } from './portfolio-post.model';
27
28
  import { Iuser } from '../types/User';
28
29
  export declare enum ProjectContractStatus {
@@ -81,7 +82,8 @@ export interface IprojectContract {
81
82
  submitFiles: {
82
83
  link: string;
83
84
  notes: string;
84
- };
85
+ status: SubmitFilesStatus;
86
+ }[];
85
87
  }
86
88
  export declare const ProjectContract: import("mongoose").Model<IprojectContract, {}, {}, {}, import("mongoose").Document<unknown, {}, IprojectContract> & IprojectContract & {
87
89
  _id: Types.ObjectId;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ProjectContract = exports.ProjectContractStatus = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const copyright_contract_model_1 = require("./copyright-contract.model");
5
6
  const model_names_1 = require("../types/model-names");
6
7
  var ProjectContractStatus;
7
8
  (function (ProjectContractStatus) {
@@ -57,8 +58,9 @@ exports.ProjectContract = (0, mongoose_1.model)(model_names_1.MODELS.projectCont
57
58
  paymentLink: String,
58
59
  duration: { type: Number, default: 0 },
59
60
  equipmentPrice: { type: Number, default: 0 },
60
- submitFiles: {
61
- link: { type: String, default: null },
62
- notes: { type: String, default: null },
63
- },
61
+ submitFiles: [{
62
+ link: { type: String, default: null },
63
+ notes: { type: String, default: null },
64
+ status: { type: String, enum: copyright_contract_model_1.SubmitFilesStatus, default: copyright_contract_model_1.SubmitFilesStatus.pending },
65
+ }],
64
66
  }, { timestamps: true, collection: model_names_1.MODELS.projectContract }));
@@ -23,6 +23,7 @@
23
23
  /// <reference types="mongoose/types/virtuals" />
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
25
  import { Types } from 'mongoose';
26
+ import { SubmitFilesStatus } from './copyright-contract.model';
26
27
  import { Icategory } from '../types/Category';
27
28
  import { CYCLES } from '../types/cycles';
28
29
  import { Iuser } from '../types/User';
@@ -102,7 +103,8 @@ export interface ITeamContract {
102
103
  submitFiles: {
103
104
  link: string;
104
105
  notes: string;
105
- };
106
+ status: SubmitFilesStatus;
107
+ }[];
106
108
  }
107
109
  export declare const TeamContract: import("mongoose").Model<ITeamContract, {}, {}, {}, import("mongoose").Document<unknown, {}, ITeamContract> & ITeamContract & {
108
110
  _id: Types.ObjectId;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TeamContract = exports.TeamContractStatus = exports.TeamProject = exports.UserStatus = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
+ const copyright_contract_model_1 = require("./copyright-contract.model");
5
6
  const cycles_1 = require("../types/cycles");
6
7
  const model_names_1 = require("../types/model-names");
7
8
  var UserStatus;
@@ -95,8 +96,9 @@ exports.TeamContract = (0, mongoose_1.model)(model_names_1.MODELS.teamContract,
95
96
  paymentAmount: { type: Number, default: 0 },
96
97
  attachments: [String],
97
98
  totalCheckoutAt: Date,
98
- submitFiles: {
99
- link: { type: String, default: null },
100
- notes: { type: String, default: null },
101
- },
99
+ submitFiles: [{
100
+ link: { type: String, default: null },
101
+ notes: { type: String, default: null },
102
+ status: { type: String, enum: copyright_contract_model_1.SubmitFilesStatus, default: copyright_contract_model_1.SubmitFilesStatus.pending },
103
+ }],
102
104
  }, { timestamps: true, collection: model_names_1.MODELS.teamContract }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duvdu-v1/duvdu",
3
- "version": "1.1.235",
3
+ "version": "1.1.236",
4
4
  "main": "./build/index.js",
5
5
  "types": "./build/index.d.ts",
6
6
  "files": [