@asapjs/sequelize 0.10.44 → 1.0.0-alpha.0

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.
Files changed (152) hide show
  1. package/dist/console/index.js +4 -4
  2. package/dist/console/index.js.map +1 -1
  3. package/dist/dbml/index.d.ts.map +1 -1
  4. package/dist/dbml/index.js +2 -2
  5. package/dist/dbml/index.js.map +1 -1
  6. package/dist/dto/ExtendableDto.d.ts +1 -1
  7. package/dist/dto/ExtendableDto.d.ts.map +1 -1
  8. package/dist/dto/ExtendableDto.js +12 -12
  9. package/dist/dto/ExtendableDto.js.map +1 -1
  10. package/dist/dto/PaginationQueryDto.js +4 -4
  11. package/dist/dto/PaginationQueryDto.js.map +1 -1
  12. package/dist/dto/index.d.ts.map +1 -1
  13. package/dist/dto/index.js +2 -2
  14. package/dist/dto/index.js.map +1 -1
  15. package/dist/index.d.ts +6 -1
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +26 -4
  18. package/dist/index.js.map +1 -1
  19. package/dist/plugin.d.ts +8 -0
  20. package/dist/plugin.d.ts.map +1 -0
  21. package/dist/plugin.js +59 -0
  22. package/dist/plugin.js.map +1 -0
  23. package/dist/repository/index.d.ts +2 -2
  24. package/dist/repository/index.d.ts.map +1 -1
  25. package/dist/repository/index.js.map +1 -1
  26. package/dist/sequelize/index.d.ts.map +1 -1
  27. package/dist/sequelize/index.js +19 -19
  28. package/dist/sequelize/index.js.map +1 -1
  29. package/dist/table/index.d.ts.map +1 -1
  30. package/dist/table/index.js +17 -3
  31. package/dist/table/index.js.map +1 -1
  32. package/dist/types/belongsto.d.ts +1 -1
  33. package/dist/types/belongsto.d.ts.map +1 -1
  34. package/dist/types/belongsto.js +2 -2
  35. package/dist/types/belongsto.js.map +1 -1
  36. package/dist/types/decorators.d.ts +4 -0
  37. package/dist/types/decorators.d.ts.map +1 -0
  38. package/dist/types/decorators.js +56 -0
  39. package/dist/types/decorators.js.map +1 -0
  40. package/dist/types/foreignkey.d.ts +1 -1
  41. package/dist/types/foreignkey.d.ts.map +1 -1
  42. package/dist/types/foreignkey.js +4 -4
  43. package/dist/types/foreignkey.js.map +1 -1
  44. package/dist/types/generators/toSequelizeGenerator.d.ts +1 -1
  45. package/dist/types/generators/toSequelizeGenerator.d.ts.map +1 -1
  46. package/dist/types/generators/toSwaggerGenerator.d.ts +1 -1
  47. package/dist/types/generators/toSwaggerGenerator.d.ts.map +1 -1
  48. package/dist/types/generators/typeGenerator.d.ts +1 -1
  49. package/dist/types/generators/typeGenerator.d.ts.map +1 -1
  50. package/dist/types/generators/typeGenerator.js.map +1 -1
  51. package/dist/types/index.d.ts +5 -23
  52. package/dist/types/index.d.ts.map +1 -1
  53. package/dist/types/index.js +4 -38
  54. package/dist/types/index.js.map +1 -1
  55. package/dist/types/paging.d.ts +1 -1
  56. package/dist/types/paging.d.ts.map +1 -1
  57. package/dist/types/paging.js +3 -3
  58. package/dist/types/paging.js.map +1 -1
  59. package/dist/types/query.d.ts +1 -1
  60. package/dist/types/query.d.ts.map +1 -1
  61. package/dist/types/query.js +2 -2
  62. package/dist/types/query.js.map +1 -1
  63. package/dist/types/register.d.ts +2 -0
  64. package/dist/types/register.d.ts.map +1 -0
  65. package/dist/types/register.js +25 -0
  66. package/dist/types/register.js.map +1 -0
  67. package/dist/types/schema-extensions.d.ts +52 -0
  68. package/dist/types/schema-extensions.d.ts.map +1 -0
  69. package/dist/types/schema-extensions.js +56 -0
  70. package/dist/types/schema-extensions.js.map +1 -0
  71. package/dist/utils/getUserIdInQuery.d.ts.map +1 -1
  72. package/dist/utils/isClass.d.ts.map +1 -1
  73. package/dist/utils/promiseTimeout.d.ts.map +1 -1
  74. package/dist/utils/swagger.d.ts +4 -0
  75. package/dist/utils/swagger.d.ts.map +1 -0
  76. package/dist/utils/swagger.js +26 -0
  77. package/dist/utils/swagger.js.map +1 -0
  78. package/package.json +18 -8
  79. package/.yarnrc.yml +0 -1
  80. package/dist/types/array.d.ts +0 -7
  81. package/dist/types/array.d.ts.map +0 -1
  82. package/dist/types/array.js +0 -58
  83. package/dist/types/array.js.map +0 -1
  84. package/dist/types/base64.d.ts +0 -10
  85. package/dist/types/base64.d.ts.map +0 -1
  86. package/dist/types/base64.js +0 -20
  87. package/dist/types/base64.js.map +0 -1
  88. package/dist/types/bigint.d.ts +0 -12
  89. package/dist/types/bigint.d.ts.map +0 -1
  90. package/dist/types/bigint.js +0 -27
  91. package/dist/types/bigint.js.map +0 -1
  92. package/dist/types/binary.d.ts +0 -10
  93. package/dist/types/binary.d.ts.map +0 -1
  94. package/dist/types/binary.js +0 -20
  95. package/dist/types/binary.js.map +0 -1
  96. package/dist/types/boolean.d.ts +0 -9
  97. package/dist/types/boolean.d.ts.map +0 -1
  98. package/dist/types/boolean.js +0 -27
  99. package/dist/types/boolean.js.map +0 -1
  100. package/dist/types/dateonly.d.ts +0 -8
  101. package/dist/types/dateonly.d.ts.map +0 -1
  102. package/dist/types/dateonly.js +0 -20
  103. package/dist/types/dateonly.js.map +0 -1
  104. package/dist/types/datetime.d.ts +0 -8
  105. package/dist/types/datetime.d.ts.map +0 -1
  106. package/dist/types/datetime.js +0 -20
  107. package/dist/types/datetime.js.map +0 -1
  108. package/dist/types/decemal.d.ts +0 -11
  109. package/dist/types/decemal.d.ts.map +0 -1
  110. package/dist/types/decemal.js +0 -30
  111. package/dist/types/decemal.js.map +0 -1
  112. package/dist/types/double.d.ts +0 -11
  113. package/dist/types/double.d.ts.map +0 -1
  114. package/dist/types/double.js +0 -27
  115. package/dist/types/double.js.map +0 -1
  116. package/dist/types/dto.d.ts +0 -10
  117. package/dist/types/dto.d.ts.map +0 -1
  118. package/dist/types/dto.js +0 -23
  119. package/dist/types/dto.js.map +0 -1
  120. package/dist/types/enum.d.ts +0 -9
  121. package/dist/types/enum.d.ts.map +0 -1
  122. package/dist/types/enum.js +0 -26
  123. package/dist/types/enum.js.map +0 -1
  124. package/dist/types/float.d.ts +0 -11
  125. package/dist/types/float.d.ts.map +0 -1
  126. package/dist/types/float.js +0 -27
  127. package/dist/types/float.js.map +0 -1
  128. package/dist/types/int.d.ts +0 -12
  129. package/dist/types/int.d.ts.map +0 -1
  130. package/dist/types/int.js +0 -27
  131. package/dist/types/int.js.map +0 -1
  132. package/dist/types/json.d.ts +0 -9
  133. package/dist/types/json.d.ts.map +0 -1
  134. package/dist/types/json.js +0 -31
  135. package/dist/types/json.js.map +0 -1
  136. package/dist/types/long.d.ts +0 -12
  137. package/dist/types/long.d.ts.map +0 -1
  138. package/dist/types/long.js +0 -27
  139. package/dist/types/long.js.map +0 -1
  140. package/dist/types/password.d.ts +0 -6
  141. package/dist/types/password.d.ts.map +0 -1
  142. package/dist/types/password.js +0 -20
  143. package/dist/types/password.js.map +0 -1
  144. package/dist/types/string.d.ts +0 -11
  145. package/dist/types/string.d.ts.map +0 -1
  146. package/dist/types/string.js +0 -26
  147. package/dist/types/string.js.map +0 -1
  148. package/dist/types/text.d.ts +0 -9
  149. package/dist/types/text.d.ts.map +0 -1
  150. package/dist/types/text.js +0 -16
  151. package/dist/types/text.js.map +0 -1
  152. package/tsconfig.json +0 -21
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TypeIsDateOnlyToSequelize = exports.TypeIsDateOnlyToSwagger = void 0;
4
- const sequelize_1 = require("sequelize");
5
- const toSequelizeGenerator_1 = require("./generators/toSequelizeGenerator");
6
- const toSwaggerGenerator_1 = require("./generators/toSwaggerGenerator");
7
- const typeGenerator_1 = require("./generators/typeGenerator");
8
- exports.TypeIsDateOnlyToSwagger = (0, toSwaggerGenerator_1.toSwaggerGenerator)((options) => ({
9
- type: 'string',
10
- format: 'date',
11
- description: options === null || options === void 0 ? void 0 : options.comment,
12
- }));
13
- exports.TypeIsDateOnlyToSequelize = (0, toSequelizeGenerator_1.toSequelizeGenerator)((options) => (Object.assign(Object.assign({}, options), { type: sequelize_1.DataTypes.DATEONLY(), comment: options === null || options === void 0 ? void 0 : options.comment })));
14
- const TypeIsDateOnly = (0, typeGenerator_1.typeGenerator)((options) => ({
15
- __name: 'date',
16
- toSwagger: () => (0, exports.TypeIsDateOnlyToSwagger)(options),
17
- toSequelize: () => (0, exports.TypeIsDateOnlyToSequelize)(options),
18
- }));
19
- exports.default = TypeIsDateOnly;
20
- //# sourceMappingURL=dateonly.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dateonly.js","sourceRoot":"","sources":["../../src/types/dateonly.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,4EAAyE;AACzE,wEAAqE;AACrE,8DAA2D;AAM9C,QAAA,uBAAuB,GAAG,IAAA,uCAAkB,EAAuB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC5F,IAAI,EAAE,QAAQ;IACd,MAAM,EAAE,MAAM;IACd,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO;CAC9B,CAAC,CAAC,CAAC;AAES,QAAA,yBAAyB,GAAG,IAAA,2CAAoB,EAAuB,CAAC,OAAO,EAAE,EAAE,CAAC,iCAC5F,OAAO,KACV,IAAI,EAAE,qBAAS,CAAC,QAAQ,EAAE,EAC1B,OAAO,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,IACzB,CAAC,CAAC;AAEJ,MAAM,cAAc,GAAG,IAAA,6BAAa,EAAuB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACvE,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,+BAAuB,EAAC,OAAO,CAAC;IACjD,WAAW,EAAE,GAAG,EAAE,CAAC,IAAA,iCAAyB,EAAC,OAAO,CAAC;CACtD,CAAC,CAAC,CAAC;AAEJ,kBAAe,cAAc,CAAC"}
@@ -1,8 +0,0 @@
1
- export interface TypeIsDateTimeOption {
2
- comment?: string;
3
- }
4
- export declare const TypeIsDateTimeToSwagger: (options?: (TypeIsDateTimeOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("./generators/toSwaggerGenerator").ISwaggerData;
5
- export declare const TypeIsDateTimeToSequelize: (options?: (TypeIsDateTimeOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>;
6
- declare const TypeIsDateTime: (...options: (import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>> | TypeIsDateTimeOption)[]) => (target?: any, propertyName?: string | undefined, propertyDescriptor?: PropertyDescriptor | undefined) => void & import("./generators/typeGenerator").TypeIsData;
7
- export default TypeIsDateTime;
8
- //# sourceMappingURL=datetime.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"datetime.d.ts","sourceRoot":"","sources":["../../src/types/datetime.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,uBAAuB,iMAIjC,CAAC;AAEJ,eAAO,MAAM,yBAAyB,+NAInC,CAAC;AAEJ,QAAA,MAAM,cAAc,mSAIjB,CAAC;AAEJ,eAAe,cAAc,CAAC"}
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TypeIsDateTimeToSequelize = exports.TypeIsDateTimeToSwagger = void 0;
4
- const sequelize_1 = require("sequelize");
5
- const toSequelizeGenerator_1 = require("./generators/toSequelizeGenerator");
6
- const toSwaggerGenerator_1 = require("./generators/toSwaggerGenerator");
7
- const typeGenerator_1 = require("./generators/typeGenerator");
8
- exports.TypeIsDateTimeToSwagger = (0, toSwaggerGenerator_1.toSwaggerGenerator)((options) => ({
9
- type: 'string',
10
- format: 'date-time',
11
- description: options === null || options === void 0 ? void 0 : options.comment,
12
- }));
13
- exports.TypeIsDateTimeToSequelize = (0, toSequelizeGenerator_1.toSequelizeGenerator)((options) => (Object.assign(Object.assign({}, options), { type: sequelize_1.DataTypes.DATE(), comment: options === null || options === void 0 ? void 0 : options.comment })));
14
- const TypeIsDateTime = (0, typeGenerator_1.typeGenerator)((options) => ({
15
- __name: 'datetime',
16
- toSwagger: () => (0, exports.TypeIsDateTimeToSwagger)(options),
17
- toSequelize: () => (0, exports.TypeIsDateTimeToSequelize)(options),
18
- }));
19
- exports.default = TypeIsDateTime;
20
- //# sourceMappingURL=datetime.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"datetime.js","sourceRoot":"","sources":["../../src/types/datetime.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,4EAAyE;AACzE,wEAAqE;AACrE,8DAA2D;AAM9C,QAAA,uBAAuB,GAAG,IAAA,uCAAkB,EAAuB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC5F,IAAI,EAAE,QAAQ;IACd,MAAM,EAAE,WAAW;IACnB,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO;CAC9B,CAAC,CAAC,CAAC;AAES,QAAA,yBAAyB,GAAG,IAAA,2CAAoB,EAAuB,CAAC,OAAO,EAAE,EAAE,CAAC,iCAC5F,OAAO,KACV,IAAI,EAAE,qBAAS,CAAC,IAAI,EAAE,EACtB,OAAO,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,IACzB,CAAC,CAAC;AAEJ,MAAM,cAAc,GAAG,IAAA,6BAAa,EAAuB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACvE,MAAM,EAAE,UAAU;IAClB,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,+BAAuB,EAAC,OAAO,CAAC;IACjD,WAAW,EAAE,GAAG,EAAE,CAAC,IAAA,iCAAyB,EAAC,OAAO,CAAC;CACtD,CAAC,CAAC,CAAC;AAEJ,kBAAe,cAAc,CAAC"}
@@ -1,11 +0,0 @@
1
- export interface TypeIsDecemalOption {
2
- precision: number;
3
- scale: number;
4
- comment?: string;
5
- }
6
- export declare const TypeIsDecemalToSwagger: (options?: (TypeIsDecemalOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("./generators/toSwaggerGenerator").ISwaggerData;
7
- export declare const TypeIsDecemalToSequelize: (options?: (TypeIsDecemalOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>;
8
- export declare const TypeIsDecemalFixValue: (o: any) => any;
9
- declare const TypeIsDecemal: (...options: (import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>> | TypeIsDecemalOption)[]) => (target?: any, propertyName?: string | undefined, propertyDescriptor?: PropertyDescriptor | undefined) => void & import("./generators/typeGenerator").TypeIsData;
10
- export default TypeIsDecemal;
11
- //# sourceMappingURL=decemal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"decemal.d.ts","sourceRoot":"","sources":["../../src/types/decemal.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,sBAAsB,gMAIhC,CAAC;AAEJ,eAAO,MAAM,wBAAwB,8NAOlC,CAAC;AAEJ,eAAO,MAAM,qBAAqB,MAAO,GAAG,QAG3C,CAAC;AAEF,QAAA,MAAM,aAAa,kSAKhB,CAAC;AAEJ,eAAe,aAAa,CAAC"}
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TypeIsDecemalFixValue = exports.TypeIsDecemalToSequelize = exports.TypeIsDecemalToSwagger = void 0;
4
- const sequelize_1 = require("sequelize");
5
- const toSequelizeGenerator_1 = require("./generators/toSequelizeGenerator");
6
- const toSwaggerGenerator_1 = require("./generators/toSwaggerGenerator");
7
- const typeGenerator_1 = require("./generators/typeGenerator");
8
- exports.TypeIsDecemalToSwagger = (0, toSwaggerGenerator_1.toSwaggerGenerator)((options) => ({
9
- type: 'integer',
10
- format: 'float',
11
- description: options === null || options === void 0 ? void 0 : options.comment,
12
- }));
13
- exports.TypeIsDecemalToSequelize = (0, toSequelizeGenerator_1.toSequelizeGenerator)((options) => (Object.assign(Object.assign({}, options), { type: sequelize_1.DataTypes.DECIMAL({
14
- precision: options === null || options === void 0 ? void 0 : options.precision,
15
- scale: options === null || options === void 0 ? void 0 : options.scale,
16
- }), comment: options === null || options === void 0 ? void 0 : options.comment })));
17
- const TypeIsDecemalFixValue = (o) => {
18
- if (o === undefined || o === null)
19
- return o;
20
- return parseFloat(String(o));
21
- };
22
- exports.TypeIsDecemalFixValue = TypeIsDecemalFixValue;
23
- const TypeIsDecemal = (0, typeGenerator_1.typeGenerator)((options) => ({
24
- __name: 'decimal',
25
- toSwagger: () => (0, exports.TypeIsDecemalToSwagger)(options),
26
- toSequelize: () => (0, exports.TypeIsDecemalToSequelize)(options),
27
- fixValue: exports.TypeIsDecemalFixValue,
28
- }));
29
- exports.default = TypeIsDecemal;
30
- //# sourceMappingURL=decemal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"decemal.js","sourceRoot":"","sources":["../../src/types/decemal.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,4EAAyE;AACzE,wEAAqE;AACrE,8DAA2D;AAQ9C,QAAA,sBAAsB,GAAG,IAAA,uCAAkB,EAAsB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC1F,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,OAAO;IACf,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO;CAC9B,CAAC,CAAC,CAAC;AAES,QAAA,wBAAwB,GAAG,IAAA,2CAAoB,EAAsB,CAAC,OAAO,EAAE,EAAE,CAAC,iCAC1F,OAAO,KACV,IAAI,EAAE,qBAAS,CAAC,OAAO,CAAC;QACtB,SAAS,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS;QAC7B,KAAK,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK;KACtB,CAAC,EACF,OAAO,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,IACzB,CAAC,CAAC;AAEG,MAAM,qBAAqB,GAAG,CAAC,CAAM,EAAE,EAAE;IAC9C,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC;IAC5C,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/B,CAAC,CAAC;AAHW,QAAA,qBAAqB,yBAGhC;AAEF,MAAM,aAAa,GAAG,IAAA,6BAAa,EAAsB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACrE,MAAM,EAAE,SAAS;IACjB,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,8BAAsB,EAAC,OAAO,CAAC;IAChD,WAAW,EAAE,GAAG,EAAE,CAAC,IAAA,gCAAwB,EAAC,OAAO,CAAC;IACpD,QAAQ,EAAE,6BAAqB;CAChC,CAAC,CAAC,CAAC;AAEJ,kBAAe,aAAa,CAAC"}
@@ -1,11 +0,0 @@
1
- export interface TypeIsDoubleOption {
2
- length?: number;
3
- decimals?: number;
4
- comment?: string;
5
- }
6
- export declare const TypeIsDoubleToSwagger: (options?: (TypeIsDoubleOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("./generators/toSwaggerGenerator").ISwaggerData;
7
- export declare const TypeIsDoubleToSequelize: (options?: (TypeIsDoubleOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>;
8
- export declare const TypeIsDoubleFixValue: (o: any) => any;
9
- declare const TypeIsDouble: (...options: (import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>> | TypeIsDoubleOption)[]) => (target?: any, propertyName?: string | undefined, propertyDescriptor?: PropertyDescriptor | undefined) => void & import("./generators/typeGenerator").TypeIsData;
10
- export default TypeIsDouble;
11
- //# sourceMappingURL=double.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"double.d.ts","sourceRoot":"","sources":["../../src/types/double.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,qBAAqB,+LAI/B,CAAC;AAEJ,eAAO,MAAM,uBAAuB,6NAIjC,CAAC;AAEJ,eAAO,MAAM,oBAAoB,MAAO,GAAG,QAG1C,CAAC;AAEF,QAAA,MAAM,YAAY,iSAKf,CAAC;AAEJ,eAAe,YAAY,CAAC"}
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TypeIsDoubleFixValue = exports.TypeIsDoubleToSequelize = exports.TypeIsDoubleToSwagger = void 0;
4
- const sequelize_1 = require("sequelize");
5
- const toSequelizeGenerator_1 = require("./generators/toSequelizeGenerator");
6
- const toSwaggerGenerator_1 = require("./generators/toSwaggerGenerator");
7
- const typeGenerator_1 = require("./generators/typeGenerator");
8
- exports.TypeIsDoubleToSwagger = (0, toSwaggerGenerator_1.toSwaggerGenerator)((options) => ({
9
- type: 'number',
10
- format: 'double',
11
- description: options === null || options === void 0 ? void 0 : options.comment,
12
- }));
13
- exports.TypeIsDoubleToSequelize = (0, toSequelizeGenerator_1.toSequelizeGenerator)((options) => (Object.assign(Object.assign({}, options), { type: sequelize_1.DataTypes.DOUBLE(options === null || options === void 0 ? void 0 : options.length, options === null || options === void 0 ? void 0 : options.decimals), comment: options === null || options === void 0 ? void 0 : options.comment })));
14
- const TypeIsDoubleFixValue = (o) => {
15
- if (o === undefined || o === null)
16
- return o;
17
- return parseFloat(String(o));
18
- };
19
- exports.TypeIsDoubleFixValue = TypeIsDoubleFixValue;
20
- const TypeIsDouble = (0, typeGenerator_1.typeGenerator)((options) => ({
21
- __name: 'double',
22
- toSwagger: () => (0, exports.TypeIsDoubleToSwagger)(options),
23
- toSequelize: () => (0, exports.TypeIsDoubleToSequelize)(options),
24
- fixValue: exports.TypeIsDoubleFixValue,
25
- }));
26
- exports.default = TypeIsDouble;
27
- //# sourceMappingURL=double.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"double.js","sourceRoot":"","sources":["../../src/types/double.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,4EAAyE;AACzE,wEAAqE;AACrE,8DAA2D;AAQ9C,QAAA,qBAAqB,GAAG,IAAA,uCAAkB,EAAqB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACxF,IAAI,EAAE,QAAQ;IACd,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO;CAC9B,CAAC,CAAC,CAAC;AAES,QAAA,uBAAuB,GAAG,IAAA,2CAAoB,EAAqB,CAAC,OAAO,EAAE,EAAE,CAAC,iCACxF,OAAO,KACV,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,CAAC,EAC1D,OAAO,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,IACzB,CAAC,CAAC;AAEG,MAAM,oBAAoB,GAAG,CAAC,CAAM,EAAE,EAAE;IAC7C,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC;IAC5C,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/B,CAAC,CAAC;AAHW,QAAA,oBAAoB,wBAG/B;AAEF,MAAM,YAAY,GAAG,IAAA,6BAAa,EAAqB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACnE,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,6BAAqB,EAAC,OAAO,CAAC;IAC/C,WAAW,EAAE,GAAG,EAAE,CAAC,IAAA,+BAAuB,EAAC,OAAO,CAAC;IACnD,QAAQ,EAAE,4BAAoB;CAC/B,CAAC,CAAC,CAAC;AAEJ,kBAAe,YAAY,CAAC"}
@@ -1,10 +0,0 @@
1
- import { ExtendableDto } from '../dto';
2
- export interface TypeIsDtoOption {
3
- dto: typeof ExtendableDto;
4
- as: string;
5
- comment?: string;
6
- }
7
- export declare const TypeIsDtoToSwagger: (options?: (TypeIsDtoOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("./generators/toSwaggerGenerator").ISwaggerData;
8
- declare const TypeIsDto: (...options: (import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>> | TypeIsDtoOption)[]) => (target?: any, propertyName?: string | undefined, propertyDescriptor?: PropertyDescriptor | undefined) => void & import("./generators/typeGenerator").TypeIsData;
9
- export default TypeIsDto;
10
- //# sourceMappingURL=dto.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dto.d.ts","sourceRoot":"","sources":["../../src/types/dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAIvC,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,OAAO,aAAa,CAAC;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,kBAAkB,4LAW7B,CAAC;AAEH,QAAA,MAAM,SAAS,8RAIZ,CAAC;AAEJ,eAAe,SAAS,CAAC"}
package/dist/types/dto.js DELETED
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TypeIsDtoToSwagger = void 0;
4
- const core_1 = require("@asapjs/core");
5
- const toSwaggerGenerator_1 = require("./generators/toSwaggerGenerator");
6
- const typeGenerator_1 = require("./generators/typeGenerator");
7
- exports.TypeIsDtoToSwagger = (0, toSwaggerGenerator_1.toSwaggerGenerator)((options) => {
8
- if (!options) {
9
- core_1.logger.error(`@asapjs/sequelize :: @TypeIs.DTO - DTO가 지정되지 않았습니다.`);
10
- process.exit(1);
11
- }
12
- const dtoName = new options.dto().constructor.name;
13
- return {
14
- $ref: `#/components/schemas/${dtoName}`,
15
- };
16
- });
17
- const TypeIsDto = (0, typeGenerator_1.typeGenerator)((options) => ({
18
- __name: 'dto',
19
- toSequelize: () => ({ dto: options === null || options === void 0 ? void 0 : options.dto, as: options === null || options === void 0 ? void 0 : options.as }),
20
- toSwagger: () => (0, exports.TypeIsDtoToSwagger)(options),
21
- }));
22
- exports.default = TypeIsDto;
23
- //# sourceMappingURL=dto.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dto.js","sourceRoot":"","sources":["../../src/types/dto.ts"],"names":[],"mappings":";;;AAAA,uCAAsC;AAEtC,wEAAqE;AACrE,8DAA2D;AAQ9C,QAAA,kBAAkB,GAAG,IAAA,uCAAkB,EAAkB,CAAC,OAAO,EAAE,EAAE;IAChF,IAAI,CAAC,OAAO,EAAE;QACZ,aAAM,CAAC,KAAK,CAAC,qDAAqD,CAAC,CAAC;QACpE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;IAED,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC;IAEnD,OAAO;QACL,IAAI,EAAE,wBAAwB,OAAO,EAAE;KACxC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,SAAS,GAAG,IAAA,6BAAa,EAAkB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC7D,MAAM,EAAE,KAAK;IACb,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,GAAG,EAAE,EAAE,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,EAAE,EAAE,CAAC;IAC3D,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,0BAAkB,EAAC,OAAO,CAAC;CAC7C,CAAC,CAAC,CAAC;AAEJ,kBAAe,SAAS,CAAC"}
@@ -1,9 +0,0 @@
1
- export interface TypeIsEnumOption {
2
- values: string[];
3
- comment?: string;
4
- }
5
- export declare const TypeIsEnumToSwagger: (options?: (TypeIsEnumOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("./generators/toSwaggerGenerator").ISwaggerData;
6
- export declare const TypeIsEnumToSequelize: (options?: (TypeIsEnumOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>;
7
- declare const TypeIsEnum: (...options: (import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>> | TypeIsEnumOption)[]) => (target?: any, propertyName?: string | undefined, propertyDescriptor?: PropertyDescriptor | undefined) => void & import("./generators/typeGenerator").TypeIsData;
8
- export default TypeIsEnum;
9
- //# sourceMappingURL=enum.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"enum.d.ts","sourceRoot":"","sources":["../../src/types/enum.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,mBAAmB,6LAI7B,CAAC;AAEJ,eAAO,MAAM,qBAAqB,2NAI/B,CAAC;AAEJ,QAAA,MAAM,UAAU,+RAQb,CAAC;AAEJ,eAAe,UAAU,CAAC"}
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TypeIsEnumToSequelize = exports.TypeIsEnumToSwagger = void 0;
4
- const sequelize_1 = require("sequelize");
5
- const toSequelizeGenerator_1 = require("./generators/toSequelizeGenerator");
6
- const toSwaggerGenerator_1 = require("./generators/toSwaggerGenerator");
7
- const typeGenerator_1 = require("./generators/typeGenerator");
8
- exports.TypeIsEnumToSwagger = (0, toSwaggerGenerator_1.toSwaggerGenerator)((options) => ({
9
- type: 'string',
10
- enum: options === null || options === void 0 ? void 0 : options.values,
11
- description: options === null || options === void 0 ? void 0 : options.comment,
12
- }));
13
- exports.TypeIsEnumToSequelize = (0, toSequelizeGenerator_1.toSequelizeGenerator)((options) => (Object.assign(Object.assign({}, options), { type: sequelize_1.DataTypes.ENUM({ values: options.values }), comment: options === null || options === void 0 ? void 0 : options.comment })));
14
- const TypeIsEnum = (0, typeGenerator_1.typeGenerator)((options) => ({
15
- __name: 'enum',
16
- toSwagger: () => (0, exports.TypeIsEnumToSwagger)(options),
17
- toSequelize: () => (0, exports.TypeIsEnumToSequelize)(options),
18
- fixValue: (o) => {
19
- var _a, _b;
20
- if (o === undefined || o === null)
21
- return o;
22
- return ((_b = (_a = options === null || options === void 0 ? void 0 : options.values) === null || _a === void 0 ? void 0 : _a.includes) === null || _b === void 0 ? void 0 : _b.call(_a, String(o))) ? String(o) : undefined;
23
- },
24
- }));
25
- exports.default = TypeIsEnum;
26
- //# sourceMappingURL=enum.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"enum.js","sourceRoot":"","sources":["../../src/types/enum.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,4EAAyE;AACzE,wEAAqE;AACrE,8DAA2D;AAO9C,QAAA,mBAAmB,GAAG,IAAA,uCAAkB,EAAmB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACpF,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM;IACrB,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO;CAC9B,CAAC,CAAC,CAAC;AAES,QAAA,qBAAqB,GAAG,IAAA,2CAAoB,EAAC,CAAC,OAA0B,EAAE,EAAE,CAAC,iCACrF,OAAO,KACV,IAAI,EAAE,qBAAS,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,OAAQ,CAAC,MAAM,EAAE,CAAC,EACjD,OAAO,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,IACzB,CAAC,CAAC;AAEJ,MAAM,UAAU,GAAG,IAAA,6BAAa,EAAmB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC/D,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,2BAAmB,EAAC,OAAO,CAAC;IAC7C,WAAW,EAAE,GAAG,EAAE,CAAC,IAAA,6BAAqB,EAAC,OAAO,CAAC;IACjD,QAAQ,EAAE,CAAC,CAAM,EAAE,EAAE;;QACnB,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,IAAI;YAAE,OAAO,CAAC,CAAC;QAC5C,OAAO,CAAA,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,0CAAE,QAAQ,mDAAG,MAAM,CAAC,CAAC,CAAC,CAAC,EAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACxE,CAAC;CACF,CAAC,CAAC,CAAC;AAEJ,kBAAe,UAAU,CAAC"}
@@ -1,11 +0,0 @@
1
- export interface TypeIsFloatOption {
2
- length?: number;
3
- decimals?: number;
4
- comment?: string;
5
- }
6
- export declare const TypeIsFloatToSwagger: (options?: (TypeIsFloatOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("./generators/toSwaggerGenerator").ISwaggerData;
7
- export declare const TypeIsFloatToSequelize: (options?: (TypeIsFloatOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>;
8
- export declare const TypeIsFloatFixValue: (o: any) => any;
9
- declare const TypeIsFloat: (...options: (import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>> | TypeIsFloatOption)[]) => (target?: any, propertyName?: string | undefined, propertyDescriptor?: PropertyDescriptor | undefined) => void & import("./generators/typeGenerator").TypeIsData;
10
- export default TypeIsFloat;
11
- //# sourceMappingURL=float.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"float.d.ts","sourceRoot":"","sources":["../../src/types/float.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,oBAAoB,8LAI9B,CAAC;AAEJ,eAAO,MAAM,sBAAsB,4NAIhC,CAAC;AAEJ,eAAO,MAAM,mBAAmB,MAAO,GAAG,QAGzC,CAAC;AAEF,QAAA,MAAM,WAAW,gSAKd,CAAC;AAEJ,eAAe,WAAW,CAAC"}
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TypeIsFloatFixValue = exports.TypeIsFloatToSequelize = exports.TypeIsFloatToSwagger = void 0;
4
- const sequelize_1 = require("sequelize");
5
- const toSequelizeGenerator_1 = require("./generators/toSequelizeGenerator");
6
- const toSwaggerGenerator_1 = require("./generators/toSwaggerGenerator");
7
- const typeGenerator_1 = require("./generators/typeGenerator");
8
- exports.TypeIsFloatToSwagger = (0, toSwaggerGenerator_1.toSwaggerGenerator)((options) => ({
9
- type: 'integer',
10
- format: 'float',
11
- description: options === null || options === void 0 ? void 0 : options.comment,
12
- }));
13
- exports.TypeIsFloatToSequelize = (0, toSequelizeGenerator_1.toSequelizeGenerator)((options) => (Object.assign(Object.assign({}, options), { type: sequelize_1.DataTypes.FLOAT(options === null || options === void 0 ? void 0 : options.length, options === null || options === void 0 ? void 0 : options.decimals), comment: options === null || options === void 0 ? void 0 : options.comment })));
14
- const TypeIsFloatFixValue = (o) => {
15
- if (o === undefined || o === null)
16
- return o;
17
- return parseFloat(String(o));
18
- };
19
- exports.TypeIsFloatFixValue = TypeIsFloatFixValue;
20
- const TypeIsFloat = (0, typeGenerator_1.typeGenerator)((options) => ({
21
- __name: 'float',
22
- toSwagger: () => (0, exports.TypeIsFloatToSwagger)(options),
23
- toSequelize: () => (0, exports.TypeIsFloatToSequelize)(options),
24
- fixValue: exports.TypeIsFloatFixValue,
25
- }));
26
- exports.default = TypeIsFloat;
27
- //# sourceMappingURL=float.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"float.js","sourceRoot":"","sources":["../../src/types/float.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,4EAAyE;AACzE,wEAAqE;AACrE,8DAA2D;AAQ9C,QAAA,oBAAoB,GAAG,IAAA,uCAAkB,EAAoB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACtF,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,OAAO;IACf,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO;CAC9B,CAAC,CAAC,CAAC;AAES,QAAA,sBAAsB,GAAG,IAAA,2CAAoB,EAAoB,CAAC,OAAO,EAAE,EAAE,CAAC,iCACtF,OAAO,KACV,IAAI,EAAE,qBAAS,CAAC,KAAK,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,CAAC,EACzD,OAAO,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,IACzB,CAAC,CAAC;AAEG,MAAM,mBAAmB,GAAG,CAAC,CAAM,EAAE,EAAE;IAC5C,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC;IAC5C,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/B,CAAC,CAAC;AAHW,QAAA,mBAAmB,uBAG9B;AAEF,MAAM,WAAW,GAAG,IAAA,6BAAa,EAAoB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACjE,MAAM,EAAE,OAAO;IACf,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,4BAAoB,EAAC,OAAO,CAAC;IAC9C,WAAW,EAAE,GAAG,EAAE,CAAC,IAAA,8BAAsB,EAAC,OAAO,CAAC;IAClD,QAAQ,EAAE,2BAAmB;CAC9B,CAAC,CAAC,CAAC;AAEJ,kBAAe,WAAW,CAAC"}
@@ -1,12 +0,0 @@
1
- export interface TypeIsIntOption {
2
- decimals?: number;
3
- precision?: number;
4
- scale?: number;
5
- comment?: string;
6
- }
7
- export declare const TypeIsIntToSwagger: (options?: (TypeIsIntOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("./generators/toSwaggerGenerator").ISwaggerData;
8
- export declare const TypeIsIntToSequelize: (options?: (TypeIsIntOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>;
9
- export declare const TypeIsIntFixValue: (o: any) => any;
10
- declare const TypeIsInt: (...options: (import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>> | TypeIsIntOption)[]) => (target?: any, propertyName?: string | undefined, propertyDescriptor?: PropertyDescriptor | undefined) => void & import("./generators/typeGenerator").TypeIsData;
11
- export default TypeIsInt;
12
- //# sourceMappingURL=int.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"int.d.ts","sourceRoot":"","sources":["../../src/types/int.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,kBAAkB,4LAI5B,CAAC;AAEJ,eAAO,MAAM,oBAAoB,0NAI9B,CAAC;AAEJ,eAAO,MAAM,iBAAiB,MAAO,GAAG,QAGvC,CAAC;AAEF,QAAA,MAAM,SAAS,8RAKZ,CAAC;AAEJ,eAAe,SAAS,CAAC"}
package/dist/types/int.js DELETED
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TypeIsIntFixValue = exports.TypeIsIntToSequelize = exports.TypeIsIntToSwagger = void 0;
4
- const sequelize_1 = require("sequelize");
5
- const toSequelizeGenerator_1 = require("./generators/toSequelizeGenerator");
6
- const toSwaggerGenerator_1 = require("./generators/toSwaggerGenerator");
7
- const typeGenerator_1 = require("./generators/typeGenerator");
8
- exports.TypeIsIntToSwagger = (0, toSwaggerGenerator_1.toSwaggerGenerator)((options) => ({
9
- type: 'integer',
10
- format: 'int32',
11
- description: options === null || options === void 0 ? void 0 : options.comment,
12
- }));
13
- exports.TypeIsIntToSequelize = (0, toSequelizeGenerator_1.toSequelizeGenerator)((options) => (Object.assign(Object.assign({}, options), { type: sequelize_1.DataTypes.INTEGER(options), comment: options === null || options === void 0 ? void 0 : options.comment })));
14
- const TypeIsIntFixValue = (o) => {
15
- if (o === undefined || o === null)
16
- return o;
17
- return parseInt(String(o), 10);
18
- };
19
- exports.TypeIsIntFixValue = TypeIsIntFixValue;
20
- const TypeIsInt = (0, typeGenerator_1.typeGenerator)((options) => ({
21
- __name: 'int',
22
- toSwagger: () => (0, exports.TypeIsIntToSwagger)(options),
23
- toSequelize: () => (0, exports.TypeIsIntToSequelize)(options),
24
- fixValue: exports.TypeIsIntFixValue,
25
- }));
26
- exports.default = TypeIsInt;
27
- //# sourceMappingURL=int.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"int.js","sourceRoot":"","sources":["../../src/types/int.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,4EAAyE;AACzE,wEAAqE;AACrE,8DAA2D;AAS9C,QAAA,kBAAkB,GAAG,IAAA,uCAAkB,EAAkB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAClF,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,OAAO;IACf,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO;CAC9B,CAAC,CAAC,CAAC;AAES,QAAA,oBAAoB,GAAG,IAAA,2CAAoB,EAAkB,CAAC,OAAO,EAAE,EAAE,CAAC,iCAClF,OAAO,KACV,IAAI,EAAE,qBAAS,CAAC,OAAO,CAAC,OAAO,CAAC,EAChC,OAAO,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,IACzB,CAAC,CAAC;AAEG,MAAM,iBAAiB,GAAG,CAAC,CAAM,EAAE,EAAE;IAC1C,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC;IAC5C,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACjC,CAAC,CAAC;AAHW,QAAA,iBAAiB,qBAG5B;AAEF,MAAM,SAAS,GAAG,IAAA,6BAAa,EAAkB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC7D,MAAM,EAAE,KAAK;IACb,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,0BAAkB,EAAC,OAAO,CAAC;IAC5C,WAAW,EAAE,GAAG,EAAE,CAAC,IAAA,4BAAoB,EAAC,OAAO,CAAC;IAChD,QAAQ,EAAE,yBAAiB;CAC5B,CAAC,CAAC,CAAC;AAEJ,kBAAe,SAAS,CAAC"}
@@ -1,9 +0,0 @@
1
- export interface TypeIsJsonOption {
2
- comment?: string;
3
- }
4
- export declare const TypeIsJsonToSwagger: (options?: (TypeIsJsonOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("./generators/toSwaggerGenerator").ISwaggerData;
5
- export declare const TypeIsJsonToSequelize: (options?: (TypeIsJsonOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>;
6
- export declare const TypeIsJsonFixValue: (o: any) => any;
7
- declare const TypeIsJson: (...options: (import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>> | TypeIsJsonOption)[]) => (target?: any, propertyName?: string | undefined, propertyDescriptor?: PropertyDescriptor | undefined) => void & import("./generators/typeGenerator").TypeIsData;
8
- export default TypeIsJson;
9
- //# sourceMappingURL=json.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../src/types/json.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,mBAAmB,6LAG7B,CAAC;AAEJ,eAAO,MAAM,qBAAqB,2NAI/B,CAAC;AAEJ,eAAO,MAAM,kBAAkB,MAAO,GAAG,QAOxC,CAAC;AAEF,QAAA,MAAM,UAAU,+RAKb,CAAC;AAEJ,eAAe,UAAU,CAAC"}
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TypeIsJsonFixValue = exports.TypeIsJsonToSequelize = exports.TypeIsJsonToSwagger = void 0;
4
- const sequelize_1 = require("sequelize");
5
- const toSequelizeGenerator_1 = require("./generators/toSequelizeGenerator");
6
- const toSwaggerGenerator_1 = require("./generators/toSwaggerGenerator");
7
- const typeGenerator_1 = require("./generators/typeGenerator");
8
- exports.TypeIsJsonToSwagger = (0, toSwaggerGenerator_1.toSwaggerGenerator)((options) => ({
9
- type: 'object',
10
- description: options === null || options === void 0 ? void 0 : options.comment,
11
- }));
12
- exports.TypeIsJsonToSequelize = (0, toSequelizeGenerator_1.toSequelizeGenerator)((options) => (Object.assign(Object.assign({}, options), { type: sequelize_1.DataTypes.JSON, comment: options === null || options === void 0 ? void 0 : options.comment })));
13
- const TypeIsJsonFixValue = (o) => {
14
- try {
15
- if (typeof o === 'string')
16
- return JSON.parse(String(o));
17
- return o;
18
- }
19
- catch (_a) {
20
- return o;
21
- }
22
- };
23
- exports.TypeIsJsonFixValue = TypeIsJsonFixValue;
24
- const TypeIsJson = (0, typeGenerator_1.typeGenerator)((options) => ({
25
- __name: 'json',
26
- toSwagger: () => (0, exports.TypeIsJsonToSwagger)(options),
27
- toSequelize: () => (0, exports.TypeIsJsonToSequelize)(options),
28
- fixValue: exports.TypeIsJsonFixValue,
29
- }));
30
- exports.default = TypeIsJson;
31
- //# sourceMappingURL=json.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"json.js","sourceRoot":"","sources":["../../src/types/json.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,4EAAyE;AACzE,wEAAqE;AACrE,8DAA2D;AAM9C,QAAA,mBAAmB,GAAG,IAAA,uCAAkB,EAAmB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACpF,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO;CAC9B,CAAC,CAAC,CAAC;AAES,QAAA,qBAAqB,GAAG,IAAA,2CAAoB,EAAmB,CAAC,OAAO,EAAE,EAAE,CAAC,iCACpF,OAAO,KACV,IAAI,EAAE,qBAAS,CAAC,IAAI,EACpB,OAAO,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,IACzB,CAAC,CAAC;AAEG,MAAM,kBAAkB,GAAG,CAAC,CAAM,EAAE,EAAE;IAC3C,IAAI;QACF,IAAI,OAAO,CAAC,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACxD,OAAO,CAAC,CAAC;KACV;IAAC,WAAM;QACN,OAAO,CAAC,CAAC;KACV;AACH,CAAC,CAAC;AAPW,QAAA,kBAAkB,sBAO7B;AAEF,MAAM,UAAU,GAAG,IAAA,6BAAa,EAAmB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC/D,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,2BAAmB,EAAC,OAAO,CAAC;IAC7C,WAAW,EAAE,GAAG,EAAE,CAAC,IAAA,6BAAqB,EAAC,OAAO,CAAC;IACjD,QAAQ,EAAE,0BAAkB;CAC7B,CAAC,CAAC,CAAC;AAEJ,kBAAe,UAAU,CAAC"}
@@ -1,12 +0,0 @@
1
- export interface TypeIsLongOption {
2
- decimals?: number;
3
- precision?: number;
4
- scale?: number;
5
- comment?: string;
6
- }
7
- export declare const TypeIsLongToSwagger: (options?: (TypeIsLongOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("./generators/toSwaggerGenerator").ISwaggerData;
8
- export declare const TypeIsLongToSequelize: (options?: (TypeIsLongOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>;
9
- export declare const TypeIsLongFixValue: (o: any) => any;
10
- declare const TypeIsLong: (...options: (import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>> | TypeIsLongOption)[]) => (target?: any, propertyName?: string | undefined, propertyDescriptor?: PropertyDescriptor | undefined) => void & import("./generators/typeGenerator").TypeIsData;
11
- export default TypeIsLong;
12
- //# sourceMappingURL=long.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"long.d.ts","sourceRoot":"","sources":["../../src/types/long.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,mBAAmB,6LAI7B,CAAC;AAEJ,eAAO,MAAM,qBAAqB,2NAI/B,CAAC;AAEJ,eAAO,MAAM,kBAAkB,MAAO,GAAG,QAGxC,CAAC;AAEF,QAAA,MAAM,UAAU,+RAKb,CAAC;AAEJ,eAAe,UAAU,CAAC"}
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TypeIsLongFixValue = exports.TypeIsLongToSequelize = exports.TypeIsLongToSwagger = void 0;
4
- const sequelize_1 = require("sequelize");
5
- const toSequelizeGenerator_1 = require("./generators/toSequelizeGenerator");
6
- const toSwaggerGenerator_1 = require("./generators/toSwaggerGenerator");
7
- const typeGenerator_1 = require("./generators/typeGenerator");
8
- exports.TypeIsLongToSwagger = (0, toSwaggerGenerator_1.toSwaggerGenerator)((options) => ({
9
- type: 'integer',
10
- format: 'int64',
11
- description: options === null || options === void 0 ? void 0 : options.comment,
12
- }));
13
- exports.TypeIsLongToSequelize = (0, toSequelizeGenerator_1.toSequelizeGenerator)((options) => (Object.assign(Object.assign({}, options), { type: sequelize_1.DataTypes.INTEGER(options), comment: options === null || options === void 0 ? void 0 : options.comment })));
14
- const TypeIsLongFixValue = (o) => {
15
- if (o === undefined || o === null)
16
- return o;
17
- return parseInt(String(o), 10);
18
- };
19
- exports.TypeIsLongFixValue = TypeIsLongFixValue;
20
- const TypeIsLong = (0, typeGenerator_1.typeGenerator)((options) => ({
21
- __name: 'long',
22
- toSwagger: () => (0, exports.TypeIsLongToSwagger)(options),
23
- toSequelize: () => (0, exports.TypeIsLongToSequelize)(options),
24
- fixValue: exports.TypeIsLongFixValue,
25
- }));
26
- exports.default = TypeIsLong;
27
- //# sourceMappingURL=long.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"long.js","sourceRoot":"","sources":["../../src/types/long.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,4EAAyE;AACzE,wEAAqE;AACrE,8DAA2D;AAS9C,QAAA,mBAAmB,GAAG,IAAA,uCAAkB,EAAmB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACpF,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,OAAO;IACf,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO;CAC9B,CAAC,CAAC,CAAC;AAES,QAAA,qBAAqB,GAAG,IAAA,2CAAoB,EAAmB,CAAC,OAAO,EAAE,EAAE,CAAC,iCACpF,OAAO,KACV,IAAI,EAAE,qBAAS,CAAC,OAAO,CAAC,OAAO,CAAC,EAChC,OAAO,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,IACzB,CAAC,CAAC;AAEG,MAAM,kBAAkB,GAAG,CAAC,CAAM,EAAE,EAAE;IAC3C,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC;IAC5C,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACjC,CAAC,CAAC;AAHW,QAAA,kBAAkB,sBAG7B;AAEF,MAAM,UAAU,GAAG,IAAA,6BAAa,EAAmB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC/D,MAAM,EAAE,MAAM;IACd,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,2BAAmB,EAAC,OAAO,CAAC;IAC7C,WAAW,EAAE,GAAG,EAAE,CAAC,IAAA,6BAAqB,EAAC,OAAO,CAAC;IACjD,QAAQ,EAAE,0BAAkB;CAC7B,CAAC,CAAC,CAAC;AAEJ,kBAAe,UAAU,CAAC"}
@@ -1,6 +0,0 @@
1
- import type { TypeIsStringOption } from './string';
2
- export declare const TypeIsPasswordToSwagger: (options?: (TypeIsStringOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("./generators/toSwaggerGenerator").ISwaggerData;
3
- export declare const TypeIsPasswordToSequelize: (options?: (TypeIsStringOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>;
4
- declare const TypeIsPassword: (...options: (import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>> | TypeIsStringOption)[]) => (target?: any, propertyName?: string | undefined, propertyDescriptor?: PropertyDescriptor | undefined) => void & import("./generators/typeGenerator").TypeIsData;
5
- export default TypeIsPassword;
6
- //# sourceMappingURL=password.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"password.d.ts","sourceRoot":"","sources":["../../src/types/password.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,eAAO,MAAM,uBAAuB,+LAIjC,CAAC;AAEJ,eAAO,MAAM,yBAAyB,6NAInC,CAAC;AAEJ,QAAA,MAAM,cAAc,iSAIjB,CAAC;AAEJ,eAAe,cAAc,CAAC"}
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TypeIsPasswordToSequelize = exports.TypeIsPasswordToSwagger = void 0;
4
- const sequelize_1 = require("sequelize");
5
- const toSequelizeGenerator_1 = require("./generators/toSequelizeGenerator");
6
- const toSwaggerGenerator_1 = require("./generators/toSwaggerGenerator");
7
- const typeGenerator_1 = require("./generators/typeGenerator");
8
- exports.TypeIsPasswordToSwagger = (0, toSwaggerGenerator_1.toSwaggerGenerator)((options) => ({
9
- type: 'string',
10
- format: 'password',
11
- description: options === null || options === void 0 ? void 0 : options.comment,
12
- }));
13
- exports.TypeIsPasswordToSequelize = (0, toSequelizeGenerator_1.toSequelizeGenerator)((options) => (Object.assign(Object.assign({}, options), { type: sequelize_1.DataTypes.STRING(512), comment: options === null || options === void 0 ? void 0 : options.comment })));
14
- const TypeIsPassword = (0, typeGenerator_1.typeGenerator)((options) => ({
15
- __name: 'password',
16
- toSwagger: () => (0, exports.TypeIsPasswordToSwagger)(options),
17
- toSequelize: () => (0, exports.TypeIsPasswordToSequelize)(options),
18
- }));
19
- exports.default = TypeIsPassword;
20
- //# sourceMappingURL=password.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"password.js","sourceRoot":"","sources":["../../src/types/password.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,4EAAyE;AACzE,wEAAqE;AACrE,8DAA2D;AAI9C,QAAA,uBAAuB,GAAG,IAAA,uCAAkB,EAAqB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC1F,IAAI,EAAE,QAAQ;IACd,MAAM,EAAE,UAAU;IAClB,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO;CAC9B,CAAC,CAAC,CAAC;AAES,QAAA,yBAAyB,GAAG,IAAA,2CAAoB,EAAqB,CAAC,OAAO,EAAE,EAAE,CAAC,iCAC1F,OAAO,KACV,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,GAAG,CAAC,EAC3B,OAAO,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,IACzB,CAAC,CAAC;AAEJ,MAAM,cAAc,GAAG,IAAA,6BAAa,EAAqB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACrE,MAAM,EAAE,UAAU;IAClB,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,+BAAuB,EAAC,OAAO,CAAC;IACjD,WAAW,EAAE,GAAG,EAAE,CAAC,IAAA,iCAAyB,EAAC,OAAO,CAAC;CACtD,CAAC,CAAC,CAAC;AAEJ,kBAAe,cAAc,CAAC"}
@@ -1,11 +0,0 @@
1
- export interface TypeIsStringOption {
2
- length?: number;
3
- binary?: boolean;
4
- comment?: string;
5
- }
6
- export declare const TypeIsStringToSwagger: (options?: (TypeIsStringOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("./generators/toSwaggerGenerator").ISwaggerData;
7
- export declare const TypeIsStringToSequelize: (options?: (TypeIsStringOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>;
8
- export declare const TypeIsStringFixValue: (o: any) => any;
9
- declare const TypeIsString: (...options: (import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>> | TypeIsStringOption)[]) => (target?: any, propertyName?: string | undefined, propertyDescriptor?: PropertyDescriptor | undefined) => void & import("./generators/typeGenerator").TypeIsData;
10
- export default TypeIsString;
11
- //# sourceMappingURL=string.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/types/string.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,qBAAqB,+LAG/B,CAAC;AAEJ,eAAO,MAAM,uBAAuB,6NAIjC,CAAC;AAEJ,eAAO,MAAM,oBAAoB,MAAO,GAAG,QAG1C,CAAC;AAEF,QAAA,MAAM,YAAY,iSAKf,CAAC;AAEJ,eAAe,YAAY,CAAC"}
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TypeIsStringFixValue = exports.TypeIsStringToSequelize = exports.TypeIsStringToSwagger = void 0;
4
- const sequelize_1 = require("sequelize");
5
- const toSequelizeGenerator_1 = require("./generators/toSequelizeGenerator");
6
- const toSwaggerGenerator_1 = require("./generators/toSwaggerGenerator");
7
- const typeGenerator_1 = require("./generators/typeGenerator");
8
- exports.TypeIsStringToSwagger = (0, toSwaggerGenerator_1.toSwaggerGenerator)((options) => ({
9
- type: 'string',
10
- description: options === null || options === void 0 ? void 0 : options.comment,
11
- }));
12
- exports.TypeIsStringToSequelize = (0, toSequelizeGenerator_1.toSequelizeGenerator)((options) => (Object.assign(Object.assign({}, options), { type: sequelize_1.DataTypes.STRING(options === null || options === void 0 ? void 0 : options.length, options === null || options === void 0 ? void 0 : options.binary), comment: options === null || options === void 0 ? void 0 : options.comment })));
13
- const TypeIsStringFixValue = (o) => {
14
- if (o === undefined || o === null)
15
- return o;
16
- return String(o);
17
- };
18
- exports.TypeIsStringFixValue = TypeIsStringFixValue;
19
- const TypeIsString = (0, typeGenerator_1.typeGenerator)((options) => ({
20
- __name: 'string',
21
- toSwagger: () => (0, exports.TypeIsStringToSwagger)(options),
22
- toSequelize: () => (0, exports.TypeIsStringToSequelize)(options),
23
- fixValue: exports.TypeIsStringFixValue,
24
- }));
25
- exports.default = TypeIsString;
26
- //# sourceMappingURL=string.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"string.js","sourceRoot":"","sources":["../../src/types/string.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AACtC,4EAAyE;AACzE,wEAAqE;AACrE,8DAA2D;AAQ9C,QAAA,qBAAqB,GAAG,IAAA,uCAAkB,EAAqB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACxF,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO;CAC9B,CAAC,CAAC,CAAC;AAES,QAAA,uBAAuB,GAAG,IAAA,2CAAoB,EAAqB,CAAC,OAAO,EAAE,EAAE,CAAC,iCACxF,OAAO,KACV,IAAI,EAAE,qBAAS,CAAC,MAAM,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,CAAC,EACxD,OAAO,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,IACzB,CAAC,CAAC;AAEG,MAAM,oBAAoB,GAAG,CAAC,CAAM,EAAE,EAAE;IAC7C,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,CAAC,CAAC;IAC5C,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;AACnB,CAAC,CAAC;AAHW,QAAA,oBAAoB,wBAG/B;AAEF,MAAM,YAAY,GAAG,IAAA,6BAAa,EAAqB,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACnE,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,6BAAqB,EAAC,OAAO,CAAC;IAC/C,WAAW,EAAE,GAAG,EAAE,CAAC,IAAA,+BAAuB,EAAC,OAAO,CAAC;IACnD,QAAQ,EAAE,4BAAoB;CAC/B,CAAC,CAAC,CAAC;AAEJ,kBAAe,YAAY,CAAC"}
@@ -1,9 +0,0 @@
1
- import { TextLength } from 'sequelize';
2
- export interface TypeIsTextOption {
3
- length?: TextLength;
4
- comment?: string;
5
- }
6
- export declare const TypeIsTextToSequelize: (options?: (TypeIsTextOption & import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>) | undefined) => import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>>;
7
- declare const TypeIsText: (...options: (import("sequelize").ModelAttributeColumnOptions<import("sequelize").Model<any, any>> | TypeIsTextOption)[]) => (target?: any, propertyName?: string | undefined, propertyDescriptor?: PropertyDescriptor | undefined) => void & import("./generators/typeGenerator").TypeIsData;
8
- export default TypeIsText;
9
- //# sourceMappingURL=text.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/types/text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,MAAM,WAAW,CAAC;AAKlD,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,qBAAqB,2NAI/B,CAAC;AAEJ,QAAA,MAAM,UAAU,+RAKb,CAAC;AAEJ,eAAe,UAAU,CAAC"}
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TypeIsTextToSequelize = void 0;
4
- const sequelize_1 = require("sequelize");
5
- const string_1 = require("./string");
6
- const typeGenerator_1 = require("./generators/typeGenerator");
7
- const toSequelizeGenerator_1 = require("./generators/toSequelizeGenerator");
8
- exports.TypeIsTextToSequelize = (0, toSequelizeGenerator_1.toSequelizeGenerator)((options) => (Object.assign(Object.assign({}, options), { type: sequelize_1.DataTypes.TEXT({ length: options === null || options === void 0 ? void 0 : options.length }), comment: options === null || options === void 0 ? void 0 : options.comment })));
9
- const TypeIsText = (0, typeGenerator_1.typeGenerator)((options) => ({
10
- __name: 'text',
11
- toSwagger: () => (0, string_1.TypeIsStringToSwagger)(options),
12
- toSequelize: () => (0, exports.TypeIsTextToSequelize)(options),
13
- fixValue: string_1.TypeIsStringFixValue,
14
- }));
15
- exports.default = TypeIsText;
16
- //# sourceMappingURL=text.js.map