@things-factory/quotation 7.0.1-alpha.77 → 7.0.1-alpha.79
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-server/service/quotation/quotation-history.js +6 -2
- package/dist-server/service/quotation/quotation-history.js.map +1 -1
- package/dist-server/service/quotation/quotation.js +4 -2
- package/dist-server/service/quotation/quotation.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/server/service/quotation/quotation-history.ts +8 -4
- package/server/service/quotation/quotation.ts +4 -2
|
@@ -28,7 +28,7 @@ tslib_1.__decorate([
|
|
|
28
28
|
], QuotationHistory.prototype, "version", void 0);
|
|
29
29
|
tslib_1.__decorate([
|
|
30
30
|
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
31
|
-
(0, type_graphql_1.Field)(
|
|
31
|
+
(0, type_graphql_1.Field)(type => shell_1.Domain),
|
|
32
32
|
tslib_1.__metadata("design:type", shell_1.Domain)
|
|
33
33
|
], QuotationHistory.prototype, "domain", void 0);
|
|
34
34
|
tslib_1.__decorate([
|
|
@@ -116,7 +116,11 @@ tslib_1.__decorate([
|
|
|
116
116
|
QuotationHistory = tslib_1.__decorate([
|
|
117
117
|
(0, typeorm_1.Entity)(),
|
|
118
118
|
(0, typeorm_1.Index)('ix_quotation_history_0', (quotationHistory) => [quotationHistory.originalId, quotationHistory.version], { unique: true }),
|
|
119
|
-
(0, typeorm_1.Index)('ix_quotation_history_1', (quotationHistory) => [
|
|
119
|
+
(0, typeorm_1.Index)('ix_quotation_history_1', (quotationHistory) => [
|
|
120
|
+
quotationHistory.domain,
|
|
121
|
+
quotationHistory.originalId,
|
|
122
|
+
quotationHistory.version
|
|
123
|
+
], { unique: true }),
|
|
120
124
|
(0, type_graphql_1.ObjectType)({ description: 'History Entity of Quotation' })
|
|
121
125
|
], QuotationHistory);
|
|
122
126
|
exports.QuotationHistory = QuotationHistory;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quotation-history.js","sourceRoot":"","sources":["../../../server/service/quotation/quotation-history.ts"],"names":[],"mappings":";;;;AAAA,+CAAoD;AACpD,qCAA8F;AAE9F,8DAKiC;AACjC,yDAAsD;AACtD,6CAA4C;AAC5C,iDAA8C;AAE9C,2CAAwD;AAExD,MAAM,SAAS,GAAG,YAAM,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;AAC7C,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"quotation-history.js","sourceRoot":"","sources":["../../../server/service/quotation/quotation-history.ts"],"names":[],"mappings":";;;;AAAA,+CAAoD;AACpD,qCAA8F;AAE9F,8DAKiC;AACjC,yDAAsD;AACtD,6CAA4C;AAC5C,iDAA8C;AAE9C,2CAAwD;AAExD,MAAM,SAAS,GAAG,YAAM,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAA;AAC7C,MAAM,aAAa,GAAG,SAAS,CAAC,IAAI,CAAA;AAkB7B,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAAtB;QAOL,YAAO,GAAY,CAAC,CAAA;IAwEtB,CAAC;CAAA,CAAA;AA9EC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;4CACC;AAEnB;IAAC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IACtC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACN;AAEpB;IAAC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;sCACb,cAAM;gDAAA;AAEf;IAAC,IAAA,oBAAU,EAAC,CAAC,SAA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,CAAC,MAAM;QACvB,gBAAgB,CAAC,UAAU;QAC3B,gBAAgB,CAAC,OAAO;KACzB,EACD,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;GAC9C,gBAAgB,CA+E5B;AA/EY,4CAAgB","sourcesContent":["import { Field, ID, ObjectType } from 'type-graphql'\nimport { Column, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId } from 'typeorm'\n\nimport {\n HistoryActionColumn,\n HistoryActionType,\n HistoryEntityInterface,\n HistoryOriginalIdColumn\n} from '@operato/typeorm-history'\nimport { Role, User } from '@things-factory/auth-base'\nimport { config } from '@things-factory/env'\nimport { Domain } from '@things-factory/shell'\n\nimport { Quotation, QuotationStatus } from './quotation'\n\nconst ORMCONFIG = config.get('ormconfig', {})\nconst DATABASE_TYPE = ORMCONFIG.type\n\n@Entity()\n@Index(\n 'ix_quotation_history_0',\n (quotationHistory: QuotationHistory) => [quotationHistory.originalId, quotationHistory.version],\n { unique: true }\n)\n@Index(\n 'ix_quotation_history_1',\n (quotationHistory: QuotationHistory) => [\n quotationHistory.domain,\n quotationHistory.originalId,\n quotationHistory.version\n ],\n { unique: true }\n)\n@ObjectType({ description: 'History Entity of Quotation' })\nexport class QuotationHistory implements HistoryEntityInterface<Quotation> {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @Column({ nullable: true, default: 1 })\n @Field({ nullable: true })\n version?: number = 1\n\n @ManyToOne(type => Domain)\n @Field(type => Domain)\n domain?: Domain\n\n @RelationId((quotation: Quotation) => quotation.domain)\n domainId?: string\n\n @Column()\n @Field()\n name: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n active?: boolean\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n state?: QuotationStatus\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n params?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n createdAt?: Date\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n updatedAt?: Date\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field({ nullable: true })\n creator?: User\n\n @RelationId((quotation: Quotation) => quotation.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field({ nullable: true })\n updater?: User\n\n @RelationId((quotation: Quotation) => quotation.updater)\n updaterId?: string\n\n @Field(type => String, { nullable: true })\n thumbnail?: string\n\n @HistoryOriginalIdColumn()\n public originalId!: string\n\n @HistoryActionColumn({\n nullable: false,\n type:\n DATABASE_TYPE == 'postgres' || DATABASE_TYPE == 'mysql' || DATABASE_TYPE == 'mariadb'\n ? 'enum'\n : DATABASE_TYPE == 'oracle'\n ? 'varchar2'\n : 'smallint',\n enum: HistoryActionType\n })\n public action!: HistoryActionType\n}\n"]}
|
|
@@ -32,7 +32,7 @@ tslib_1.__decorate([
|
|
|
32
32
|
], Quotation.prototype, "version", void 0);
|
|
33
33
|
tslib_1.__decorate([
|
|
34
34
|
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
35
|
-
(0, type_graphql_1.Field)(
|
|
35
|
+
(0, type_graphql_1.Field)(type => shell_1.Domain),
|
|
36
36
|
tslib_1.__metadata("design:type", shell_1.Domain)
|
|
37
37
|
], Quotation.prototype, "domain", void 0);
|
|
38
38
|
tslib_1.__decorate([
|
|
@@ -103,7 +103,9 @@ tslib_1.__decorate([
|
|
|
103
103
|
], Quotation.prototype, "thumbnail", void 0);
|
|
104
104
|
Quotation = tslib_1.__decorate([
|
|
105
105
|
(0, typeorm_1.Entity)(),
|
|
106
|
-
(0, typeorm_1.Index)('ix_quotation_0', (quotation) => [quotation.domain, quotation.name, quotation.deletedAt], {
|
|
106
|
+
(0, typeorm_1.Index)('ix_quotation_0', (quotation) => [quotation.domain, quotation.name, quotation.deletedAt], {
|
|
107
|
+
unique: true
|
|
108
|
+
}),
|
|
107
109
|
(0, type_graphql_1.ObjectType)({ description: 'Entity for Quotation' })
|
|
108
110
|
], Quotation);
|
|
109
111
|
exports.Quotation = Quotation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quotation.js","sourceRoot":"","sources":["../../../server/service/quotation/quotation.ts"],"names":[],"mappings":";;;;AAAA,qCAWgB;AAChB,+CAA2E;AAE3E,iDAA8C;AAC9C,yDAAgD;AAEhD,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,wCAAqB,CAAA;IACrB,wCAAqB,CAAA;AACvB,CAAC,EAHW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAG1B;AAED,IAAA,+BAAgB,EAAC,eAAe,EAAE;IAChC,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,kCAAkC;CAChD,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"quotation.js","sourceRoot":"","sources":["../../../server/service/quotation/quotation.ts"],"names":[],"mappings":";;;;AAAA,qCAWgB;AAChB,+CAA2E;AAE3E,iDAA8C;AAC9C,yDAAgD;AAEhD,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,wCAAqB,CAAA;IACrB,wCAAqB,CAAA;AACvB,CAAC,EAHW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAG1B;AAED,IAAA,+BAAgB,EAAC,eAAe,EAAE;IAChC,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,kCAAkC;CAChD,CAAC,CAAA;AAOK,IAAM,SAAS,GAAf,MAAM,SAAS;IAAf;QAOL,YAAO,GAAY,CAAC,CAAA;IAyDtB,CAAC;CAAA,CAAA;AA/DC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;qCACC;AAEnB;IAAC,IAAA,uBAAa,GAAE;IACf,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,E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edColumn,\n VersionColumn\n} from 'typeorm'\nimport { ObjectType, Field, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\nexport enum QuotationStatus {\n STATUS_A = 'STATUS_A',\n STATUS_B = 'STATUS_B'\n}\n\nregisterEnumType(QuotationStatus, {\n name: 'QuotationStatus',\n description: 'state enumeration of a quotation'\n})\n\n@Entity()\n@Index('ix_quotation_0', (quotation: Quotation) => [quotation.domain, quotation.name, quotation.deletedAt], {\n unique: true\n})\n@ObjectType({ description: 'Entity for Quotation' })\nexport class Quotation {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @VersionColumn()\n @Field({ nullable: true })\n version?: number = 1\n\n @ManyToOne(type => Domain)\n @Field(type => Domain)\n domain?: Domain\n\n @RelationId((quotation: Quotation) => quotation.domain)\n domainId?: string\n\n @Column()\n @Field({ nullable: true })\n name?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n active?: boolean\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n state?: QuotationStatus\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n params?: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((quotation: Quotation) => quotation.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((quotation: Quotation) => quotation.updater)\n updaterId?: string\n\n @Field(type => String, { nullable: true })\n thumbnail?: string\n}\n"]}
|