{"_id":"@adocasts.com/dto","_rev":"10-fe26a2389289b2ca895510b587ec10fe","name":"@adocasts.com/dto","dist-tags":{"latest":"0.0.10"},"versions":{"0.0.1":{"name":"@adocasts.com/dto","version":"0.0.1","keywords":["adonisjs","lucid","dto","generate","make"],"author":{"name":"tomgobich,adocasts.com"},"license":"MIT","_id":"@adocasts.com/dto@0.0.1","maintainers":[{"name":"tomgobich","email":"tom@tomgobich.com"}],"homepage":"https://github.com/adocasts/package-dto#readme","bugs":{"url":"https://github.com/adocasts/package-dto/issues"},"c8":{"exclude":["tests/**"],"reporter":["text","html"]},"np":{"tag":"latest","branch":"main","message":"chore(release): %s","anyBranch":false},"dist":{"shasum":"b83c7e4c6ceb495e86f131ca14e38e46c0fb85bd","tarball":"https://registry.npmjs.org/@adocasts.com/dto/-/dto-0.0.1.tgz","fileCount":18,"integrity":"sha512-o60amumm6m/hpuNVrEv5MVrFbKl0zQhn2prrWYcGy+PkuuQ7+Yk4oKI6gmZsDw+1j62Bshm6rgvfyZPsh5BpWw==","signatures":[{"sig":"MEUCIQC2JXJeRKmORD9Xw7g+xU3RfNfOmUykpHxodSA57fkd9gIgQikr+QUS1p0hC3wSTtvhrlkOiKbLdGfdIw/eiw0SMas=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22831},"type":"module","engines":{"node":">=20.6.0"},"exports":{".":"./build/index.js","./types":"./build/src/types.js","./commands":"./build/commands/main.js"},"gitHead":"e39965f8693cb9f2355cacba799fd124c803171f","scripts":{"lint":"eslint . --ext=.ts","test":"c8 npm run quick:test","build":"tsc","clean":"del-cli build","format":"prettier --write .","pretest":"npm run lint","release":"np","version":"npm run build","prebuild":"npm run lint && npm run clean","postbuild":"npm run copy:templates && npm run index:commands","typecheck":"tsc --noEmit","quick:test":"node --import=./tsnode.esm.js --enable-source-maps bin/test.ts","copy:templates":"copyfiles \"stubs/**/*.stub\" build","index:commands":"adonis-kit index build/commands","prepublishOnly":"npm run build"},"_npmUser":{"name":"tomgobich","email":"tom@tomgobich.com"},"prettier":"@adonisjs/prettier-config","repository":{"url":"git+https://github.com/adocasts/package-dto.git","type":"git"},"_npmVersion":"10.7.0","description":"Easily make and generate DTOs from Lucid Models","directories":{},"_nodeVersion":"20.14.0","dependencies":{"@japa/file-system":"^2.3.0"},"eslintConfig":{"extends":"@adonisjs/eslint-config/package"},"publishConfig":{"tag":"latest","access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^9.1.0","np":"^10.0.0","eslint":"^8.57.0","del-cli":"^5.1.0","ts-node":"^10.9.2","prettier":"^3.2.5","@swc/core":"^1.4.6","copyfiles":"^2.4.1","typescript":"^5.4.2","@types/node":"^20.11.25","@japa/assert":"^2.1.0","@japa/runner":"^3.1.1","@adonisjs/core":"^6.3.1","@adonisjs/tsconfig":"^1.3.0","@adonisjs/assembler":"^7.2.3","@adonisjs/eslint-config":"^1.3.0","@adonisjs/prettier-config":"^1.3.0"},"peerDependencies":{"@adonisjs/core":"^6.2.0"},"_npmOperationalInternal":{"tmp":"tmp/dto_0.0.1_1717979708693_0.3605353515951617","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"@adocasts.com/dto","version":"0.0.2","keywords":["adonisjs","lucid","dto","generate","make"],"author":{"name":"tomgobich,adocasts.com"},"license":"MIT","_id":"@adocasts.com/dto@0.0.2","maintainers":[{"name":"tomgobich","email":"tom@tomgobich.com"}],"homepage":"https://github.com/adocasts/package-dto#readme","bugs":{"url":"https://github.com/adocasts/package-dto/issues"},"c8":{"exclude":["tests/**"],"reporter":["text","html"]},"np":{"tag":"latest","branch":"main","message":"chore(release): %s","anyBranch":false},"dist":{"shasum":"d9e61d8a16918b171012f11722c36db804ef7d2e","tarball":"https://registry.npmjs.org/@adocasts.com/dto/-/dto-0.0.2.tgz","fileCount":20,"integrity":"sha512-zldNWdnyAqP9JEbIUjOMQe8FP2aB0FvFELo+TneY9mvnhb+4q03wWBCq3zErHHffkXP5j9M6ZgzdTy+8Kdt4/g==","signatures":[{"sig":"MEUCIBgliy9puFhWgNjZw1/+f0Z63jCUH4uFGFIYntPna+2aAiEAjIwT/3fSpGoGb2waY7rJ+R350xWnbVmKHjiufkIkPs0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24036},"type":"module","engines":{"node":">=20.6.0"},"exports":{".":"./build/index.js","./types":"./build/src/types.js","./commands":"./build/commands/main.js"},"gitHead":"d7cb7514085c2c872aa0bba6ca3e53f09b030f37","scripts":{"lint":"eslint . --ext=.ts","test":"c8 npm run quick:test","build":"tsc","clean":"del-cli build","format":"prettier --write .","pretest":"npm run lint","release":"np","version":"npm run build","prebuild":"npm run lint && npm run clean","postbuild":"npm run copy:templates && npm run index:commands","typecheck":"tsc --noEmit","quick:test":"node --import=./tsnode.esm.js --enable-source-maps bin/test.ts","copy:templates":"copyfiles \"stubs/**/*.stub\" build","index:commands":"adonis-kit index build/commands","prepublishOnly":"npm run build"},"_npmUser":{"name":"tomgobich","email":"tom@tomgobich.com"},"prettier":"@adonisjs/prettier-config","repository":{"url":"git+https://github.com/adocasts/package-dto.git","type":"git"},"_npmVersion":"10.7.0","description":"Easily make and generate DTOs from Lucid Models","directories":{},"_nodeVersion":"20.14.0","dependencies":{"@japa/file-system":"^2.3.0"},"eslintConfig":{"extends":"@adonisjs/eslint-config/package"},"publishConfig":{"tag":"latest","access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^9.1.0","np":"^10.0.0","eslint":"^8.57.0","del-cli":"^5.1.0","ts-node":"^10.9.2","prettier":"^3.2.5","@swc/core":"^1.4.6","copyfiles":"^2.4.1","typescript":"^5.4.2","@types/node":"^20.11.25","@japa/assert":"^2.1.0","@japa/runner":"^3.1.1","@adonisjs/core":"^6.3.1","@adonisjs/tsconfig":"^1.3.0","@adonisjs/assembler":"^7.2.3","@adonisjs/eslint-config":"^1.3.0","@adonisjs/prettier-config":"^1.3.0"},"peerDependencies":{"@adonisjs/core":"^6.2.0"},"_npmOperationalInternal":{"tmp":"tmp/dto_0.0.2_1718498055894_0.6549178127749185","host":"s3://npm-registry-packages"}},"0.0.3":{"name":"@adocasts.com/dto","version":"0.0.3","keywords":["adonisjs","lucid","dto","generate","make"],"author":{"name":"tomgobich,adocasts.com"},"license":"MIT","_id":"@adocasts.com/dto@0.0.3","maintainers":[{"name":"tomgobich","email":"tom@tomgobich.com"}],"homepage":"https://github.com/adocasts/package-dto#readme","bugs":{"url":"https://github.com/adocasts/package-dto/issues"},"c8":{"exclude":["tests/**"],"reporter":["text","html"]},"np":{"tag":"latest","branch":"main","message":"chore(release): %s","anyBranch":false},"dist":{"shasum":"3de7adcc548f7aed3a64fff790e0c9aa3af51dfe","tarball":"https://registry.npmjs.org/@adocasts.com/dto/-/dto-0.0.3.tgz","fileCount":30,"integrity":"sha512-u50Zh/V+OhTPeEsDafZJCiynAZFQRVUsOc+A1XcwzqwBm+DjAXwDY8AgPiLMeN4euGLXGZeUD/s16H4aePDKMg==","signatures":[{"sig":"MEYCIQDrneTYPb/E9A6Fy0tRVNXsbm4f89teFnhpn+GnHroQDwIhAOq7szf6gn+EhQxfl2WKY5sY7nQajEOwJpErS15cTOx9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41538},"type":"module","engines":{"node":">=20.6.0"},"exports":{".":"./build/index.js","./types":"./build/src/types.js","./commands":"./build/commands/main.js"},"gitHead":"a78d00cff55c15fdb22a0ef13ed9b3ff0efca906","scripts":{"lint":"eslint . --ext=.ts","test":"c8 npm run quick:test","build":"tsc","clean":"del-cli build","format":"prettier --write .","pretest":"npm run lint","release":"np","version":"npm run build","prebuild":"npm run lint && npm run clean","postbuild":"npm run copy:templates && npm run index:commands","typecheck":"tsc --noEmit","quick:test":"node --import=./tsnode.esm.js --enable-source-maps bin/test.ts","copy:templates":"copyfiles \"stubs/**/*.stub\" build","index:commands":"adonis-kit index build/commands","prepublishOnly":"npm run build"},"_npmUser":{"name":"tomgobich","email":"tom@tomgobich.com"},"prettier":"@adonisjs/prettier-config","repository":{"url":"git+https://github.com/adocasts/package-dto.git","type":"git"},"_npmVersion":"10.7.0","description":"Easily make and generate DTOs from Lucid Models","directories":{},"_nodeVersion":"20.14.0","dependencies":{"@japa/file-system":"^2.3.0"},"eslintConfig":{"extends":"@adonisjs/eslint-config/package"},"publishConfig":{"tag":"latest","access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^9.1.0","np":"^10.0.0","eslint":"^8.57.0","del-cli":"^5.1.0","ts-node":"^10.9.2","prettier":"^3.2.5","@swc/core":"^1.4.6","copyfiles":"^2.4.1","typescript":"^5.4.2","@types/node":"^20.11.25","@japa/assert":"^2.1.0","@japa/runner":"^3.1.1","@adonisjs/core":"^6.3.1","@adonisjs/tsconfig":"^1.3.0","@adonisjs/assembler":"^7.2.3","@adonisjs/eslint-config":"^1.3.0","@adonisjs/prettier-config":"^1.3.0"},"peerDependencies":{"@adonisjs/core":"^6.2.0"},"_npmOperationalInternal":{"tmp":"tmp/dto_0.0.3_1718498468068_0.4314947028891334","host":"s3://npm-registry-packages"}},"0.0.4":{"name":"@adocasts.com/dto","version":"0.0.4","keywords":["adonisjs","lucid","dto","generate","make"],"author":{"name":"tomgobich,adocasts.com"},"license":"MIT","_id":"@adocasts.com/dto@0.0.4","maintainers":[{"name":"tomgobich","email":"tom@tomgobich.com"}],"homepage":"https://github.com/adocasts/package-dto#readme","bugs":{"url":"https://github.com/adocasts/package-dto/issues"},"c8":{"exclude":["tests/**"],"reporter":["text","html"]},"np":{"tag":"latest","branch":"main","message":"chore(release): %s","anyBranch":false},"dist":{"shasum":"b8bdce9a69938aad126fc1458aac0ac5cef0684d","tarball":"https://registry.npmjs.org/@adocasts.com/dto/-/dto-0.0.4.tgz","fileCount":40,"integrity":"sha512-zqxp2GSEX3QqyZCntnxvkyKKaAqAkig0ttvwG1QOFXR3zJp8Ih2RQKCyeiMQYvCwShvOypPtfNA/ihF5lPzIFg==","signatures":[{"sig":"MEUCIQCbFm4loC+h50aJoGBm/LQwh7Zd+pA8VP+Xi5dhFD16nAIgOkj6AKFFiOxFn+CEqKhKnXitZ43yllI1aQaTZOpAAVw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49893},"type":"module","engines":{"node":">=20.6.0"},"exports":{".":"./build/index.js","./base":"./build/src/base/main.js","./types":"./build/src/types.js","./commands":"./build/commands/main.js","./paginator":"./build/src/paginator/main.js"},"gitHead":"9d4d684334c608e0d5a4c69b3d6745f085be5576","scripts":{"lint":"eslint . --ext=.ts","test":"c8 npm run quick:test","build":"tsc","clean":"del-cli build","format":"prettier --write .","pretest":"npm run lint","release":"np","version":"npm run build","prebuild":"npm run lint && npm run clean","postbuild":"npm run copy:templates && npm run index:commands","typecheck":"tsc --noEmit","quick:test":"node --import=./tsnode.esm.js --enable-source-maps bin/test.ts","copy:templates":"copyfiles \"stubs/**/*.stub\" build","index:commands":"adonis-kit index build/commands","prepublishOnly":"npm run build"},"_npmUser":{"name":"tomgobich","email":"tom@tomgobich.com"},"prettier":"@adonisjs/prettier-config","repository":{"url":"git+https://github.com/adocasts/package-dto.git","type":"git"},"_npmVersion":"10.7.0","description":"Easily make and generate DTOs from Lucid Models","directories":{},"_nodeVersion":"20.14.0","dependencies":{"@japa/file-system":"^2.3.0"},"eslintConfig":{"extends":"@adonisjs/eslint-config/package"},"publishConfig":{"tag":"latest","access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^9.1.0","np":"^10.0.0","eslint":"^8.57.0","del-cli":"^5.1.0","ts-node":"^10.9.2","prettier":"^3.2.5","@swc/core":"^1.4.6","copyfiles":"^2.4.1","typescript":"^5.4.2","@types/node":"^20.11.25","@japa/assert":"^2.1.0","@japa/runner":"^3.1.1","@adonisjs/core":"^6.3.1","@adonisjs/lucid":"^21.1.0","@adonisjs/tsconfig":"^1.3.0","@adonisjs/assembler":"^7.2.3","@adonisjs/eslint-config":"^1.3.0","@adonisjs/prettier-config":"^1.3.0"},"peerDependencies":{"@adonisjs/core":"^6.2.0","@adonisjs/lucid":"^21.1.0"},"_npmOperationalInternal":{"tmp":"tmp/dto_0.0.4_1721867790240_0.24914912154868407","host":"s3://npm-registry-packages"}},"0.0.5-0":{"name":"@adocasts.com/dto","version":"0.0.5-0","keywords":["adonisjs","lucid","dto","generate","make"],"author":{"name":"tomgobich,adocasts.com"},"license":"MIT","_id":"@adocasts.com/dto@0.0.5-0","maintainers":[{"name":"tomgobich","email":"tom@tomgobich.com"}],"homepage":"https://github.com/adocasts/package-dto#readme","bugs":{"url":"https://github.com/adocasts/package-dto/issues"},"c8":{"exclude":["tests/**"],"reporter":["text","html"]},"np":{"tag":"latest","branch":"main","message":"chore(release): %s","anyBranch":false},"dist":{"shasum":"2d03e8a8388e7653ac150e6d1b1f922397c237da","tarball":"https://registry.npmjs.org/@adocasts.com/dto/-/dto-0.0.5-0.tgz","fileCount":40,"integrity":"sha512-zuvSMBzotf8Sh7qDkXJ21jwF31b29/8e0pnsoVeFM5Efbu71IXehiw+CYycG5Jo+M4YSx1diwXZ6czWYxSRFFw==","signatures":[{"sig":"MEUCIQC55FnEAsqIBzvwWSMcwZaacXLbiUfG3h/cc1aZBe5vjgIgDvkjNpUVkYFgs50sssA382vI2TycUUFrumAYfd1nts0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50143},"type":"module","engines":{"node":">=20.6.0"},"exports":{".":"./build/index.js","./base":"./build/src/base/main.js","./types":"./build/src/types.js","./commands":"./build/commands/main.js","./paginator":"./build/src/paginator/main.js"},"gitHead":"a20f86a19c45ee7a332fa8dd026768aad23f0dab","scripts":{"lint":"eslint . --ext=.ts","test":"c8 npm run quick:test","build":"tsc","clean":"del-cli build","format":"prettier --write .","pretest":"npm run lint","release":"np","version":"npm run build","prebuild":"npm run lint && npm run clean","postbuild":"npm run copy:templates && npm run index:commands","typecheck":"tsc --noEmit","quick:test":"node --import=./tsnode.esm.js --enable-source-maps bin/test.ts","copy:templates":"copyfiles \"stubs/**/*.stub\" build","index:commands":"adonis-kit index build/commands","prepublishOnly":"npm run build"},"_npmUser":{"name":"tomgobich","email":"tom@tomgobich.com"},"prettier":"@adonisjs/prettier-config","repository":{"url":"git+https://github.com/adocasts/package-dto.git","type":"git"},"_npmVersion":"10.7.0","description":"Easily make and generate DTOs from Lucid Models","directories":{},"_nodeVersion":"20.14.0","dependencies":{"@japa/file-system":"^2.3.0"},"eslintConfig":{"extends":"@adonisjs/eslint-config/package"},"publishConfig":{"tag":"latest","access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^9.1.0","np":"^10.0.0","eslint":"^8.57.0","del-cli":"^5.1.0","ts-node":"^10.9.2","prettier":"^3.2.5","@swc/core":"^1.4.6","copyfiles":"^2.4.1","typescript":"^5.4.2","@types/node":"^20.11.25","@japa/assert":"^2.1.0","@japa/runner":"^3.1.1","@adonisjs/core":"^6.3.1","@adonisjs/lucid":"^21.1.0","@adonisjs/tsconfig":"^1.3.0","@adonisjs/assembler":"^7.2.3","@adonisjs/eslint-config":"^1.3.0","@adonisjs/prettier-config":"^1.3.0"},"peerDependencies":{"@adonisjs/core":"^6.2.0","@adonisjs/lucid":"^21.1.0"},"_npmOperationalInternal":{"tmp":"tmp/dto_0.0.5-0_1721878958382_0.37084656579211406","host":"s3://npm-registry-packages"}},"0.0.6":{"name":"@adocasts.com/dto","version":"0.0.6","keywords":["adonisjs","lucid","dto","generate","make"],"author":{"name":"tomgobich,adocasts.com"},"license":"MIT","_id":"@adocasts.com/dto@0.0.6","maintainers":[{"name":"tomgobich","email":"tom@tomgobich.com"}],"homepage":"https://github.com/adocasts/package-dto#readme","bugs":{"url":"https://github.com/adocasts/package-dto/issues"},"c8":{"exclude":["tests/**"],"reporter":["text","html"]},"np":{"tag":"latest","branch":"main","message":"chore(release): %s","anyBranch":false},"dist":{"shasum":"21e779fd74566cf684caa430a23e046ff18c809e","tarball":"https://registry.npmjs.org/@adocasts.com/dto/-/dto-0.0.6.tgz","fileCount":40,"integrity":"sha512-fIerzz/MYnFUwqCo5WRW7dhZzngW84gCwcwD36vdgHRbG+RGWPUL7D3r13AoL/xLubbV2j3asUo8lyaWTJXN0g==","signatures":[{"sig":"MEQCIFMitC93914H4fjZS0lV2Dh+qNfPuy9XnCuvC29x3diEAiB52NA6pi8Jpp2u+22J1kc9iSclWVQBuzTMTEY7de46+g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50567},"type":"module","engines":{"node":">=20.6.0"},"exports":{".":"./build/index.js","./base":"./build/src/base/main.js","./types":"./build/src/types.js","./commands":"./build/commands/main.js","./paginator":"./build/src/paginator/main.js"},"gitHead":"0346887f98c0570c36297f5c44f09a0db5dd9483","scripts":{"lint":"eslint . --ext=.ts","test":"c8 npm run quick:test","build":"tsc","clean":"del-cli build","format":"prettier --write .","pretest":"npm run lint","release":"np","version":"npm run build","prebuild":"npm run lint && npm run clean","postbuild":"npm run copy:templates && npm run index:commands","typecheck":"tsc --noEmit","quick:test":"node --import=./tsnode.esm.js --enable-source-maps bin/test.ts","copy:templates":"copyfiles \"stubs/**/*.stub\" build","index:commands":"adonis-kit index build/commands","prepublishOnly":"npm run build"},"_npmUser":{"name":"tomgobich","email":"tom@tomgobich.com"},"prettier":"@adonisjs/prettier-config","repository":{"url":"git+https://github.com/adocasts/package-dto.git","type":"git"},"_npmVersion":"10.7.0","description":"Easily make and generate DTOs from Lucid Models","directories":{},"_nodeVersion":"20.14.0","dependencies":{"@japa/file-system":"^2.3.0"},"eslintConfig":{"extends":"@adonisjs/eslint-config/package"},"publishConfig":{"tag":"latest","access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^9.1.0","np":"^10.0.0","eslint":"^8.57.0","del-cli":"^5.1.0","ts-node":"^10.9.2","prettier":"^3.2.5","@swc/core":"^1.4.6","copyfiles":"^2.4.1","typescript":"^5.4.2","@types/node":"^20.11.25","@japa/assert":"^2.1.0","@japa/runner":"^3.1.1","@adonisjs/core":"^6.3.1","@adonisjs/lucid":"^21.1.0","@adonisjs/tsconfig":"^1.3.0","@adonisjs/assembler":"^7.2.3","@adonisjs/eslint-config":"^1.3.0","@adonisjs/prettier-config":"^1.3.0"},"peerDependencies":{"@adonisjs/core":"^6.2.0","@adonisjs/lucid":"^21.1.0"},"_npmOperationalInternal":{"tmp":"tmp/dto_0.0.6_1721907938637_0.3642593456338912","host":"s3://npm-registry-packages"}},"0.0.7":{"name":"@adocasts.com/dto","version":"0.0.7","keywords":["adonisjs","lucid","dto","generate","make"],"author":{"name":"tomgobich,adocasts.com"},"license":"MIT","_id":"@adocasts.com/dto@0.0.7","maintainers":[{"name":"tomgobich","email":"tom@tomgobich.com"}],"homepage":"https://github.com/adocasts/package-dto#readme","bugs":{"url":"https://github.com/adocasts/package-dto/issues"},"c8":{"exclude":["tests/**"],"reporter":["text","html"]},"np":{"tag":"latest","branch":"main","message":"chore(release): %s","anyBranch":false},"dist":{"shasum":"8ffb1a6851d48bf5cab82382190f34cdaf57c850","tarball":"https://registry.npmjs.org/@adocasts.com/dto/-/dto-0.0.7.tgz","fileCount":40,"integrity":"sha512-TaTBDKq8/FK1r+j7MloZhHA2X+iByMSGLF+rzSnUQq+tRvbufDHaTuhY48LOoMmyzb23DOZJR1FVOVAXpJJLnw==","signatures":[{"sig":"MEUCICAZp1LFx/AT6uoVzEGzA6PaW8KMLmElE8Gr98NPwBZ1AiEAo8OjtXvGdMM7utCgz65spZ/JofP1pa8t8K0ObK7cWpg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50622},"type":"module","engines":{"node":">=20.6.0"},"exports":{".":"./build/index.js","./base":"./build/src/base/main.js","./types":"./build/src/types.js","./commands":"./build/commands/main.js","./paginator":"./build/src/paginator/main.js"},"gitHead":"0a8de0d185903b31934a9b4ef6ff0aeaf211209c","scripts":{"lint":"eslint . --ext=.ts","test":"c8 npm run quick:test","build":"tsc","clean":"del-cli build","format":"prettier --write .","pretest":"npm run lint","release":"np","version":"npm run build","prebuild":"npm run lint && npm run clean","postbuild":"npm run copy:templates && npm run index:commands","typecheck":"tsc --noEmit","quick:test":"node --import=./tsnode.esm.js --enable-source-maps bin/test.ts","copy:templates":"copyfiles \"stubs/**/*.stub\" build","index:commands":"adonis-kit index build/commands","prepublishOnly":"npm run build"},"_npmUser":{"name":"tomgobich","email":"tom@tomgobich.com"},"prettier":"@adonisjs/prettier-config","repository":{"url":"git+https://github.com/adocasts/package-dto.git","type":"git"},"_npmVersion":"10.7.0","description":"Easily make and generate DTOs from Lucid Models","directories":{},"_nodeVersion":"20.14.0","dependencies":{"@japa/file-system":"^2.3.0"},"eslintConfig":{"extends":"@adonisjs/eslint-config/package"},"publishConfig":{"tag":"latest","access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^9.1.0","np":"^10.0.0","eslint":"^8.57.0","del-cli":"^5.1.0","ts-node":"^10.9.2","prettier":"^3.2.5","@swc/core":"^1.4.6","copyfiles":"^2.4.1","typescript":"^5.4.2","@types/node":"^20.11.25","@japa/assert":"^2.1.0","@japa/runner":"^3.1.1","@adonisjs/core":"^6.3.1","@adonisjs/lucid":"^21.1.0","@adonisjs/tsconfig":"^1.3.0","@adonisjs/assembler":"^7.2.3","@adonisjs/eslint-config":"^1.3.0","@adonisjs/prettier-config":"^1.3.0"},"peerDependencies":{"@adonisjs/core":"^6.2.0","@adonisjs/lucid":"^21.1.0"},"_npmOperationalInternal":{"tmp":"tmp/dto_0.0.7_1731025064087_0.25315974375317385","host":"s3://npm-registry-packages"}},"0.0.8":{"name":"@adocasts.com/dto","version":"0.0.8","keywords":["adonisjs","lucid","dto","generate","make"],"author":{"name":"tomgobich,adocasts.com"},"license":"MIT","_id":"@adocasts.com/dto@0.0.8","maintainers":[{"name":"tomgobich","email":"tom@tomgobich.com"}],"homepage":"https://github.com/adocasts/package-dto#readme","bugs":{"url":"https://github.com/adocasts/package-dto/issues"},"c8":{"exclude":["tests/**"],"reporter":["text","html"]},"np":{"tag":"latest","branch":"main","message":"chore(release): %s","anyBranch":false},"dist":{"shasum":"eaeebb5b3d55aaa68392febbfcd28ea0ed1f87a4","tarball":"https://registry.npmjs.org/@adocasts.com/dto/-/dto-0.0.8.tgz","fileCount":40,"integrity":"sha512-UJ0VuDfk1BcoN5AG0+7LLb5tDxwh3ohYN5w6I5XA9k+zCNkNpSSjzCkhRtRlw2gkppqu055XNXBM/vHk56D5yg==","signatures":[{"sig":"MEUCIQCURVT2grzksyLOZF2KqVHSy5yh1iy5hBMF/opckX6IjAIgEpYb5Ypl8v9y53M2vqVbXYCgsiaBZQMtp9hxdbpicwE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50618},"type":"module","engines":{"node":">=20.6.0"},"exports":{".":"./build/index.js","./base":"./build/src/base/main.js","./types":"./build/src/types.js","./commands":"./build/commands/main.js","./paginator":"./build/src/paginator/main.js"},"gitHead":"c958d408997aefe1b730517a8f23f8a46154803a","scripts":{"lint":"eslint . --ext=.ts","test":"c8 npm run quick:test","build":"tsc","clean":"del-cli build","format":"prettier --write .","pretest":"npm run lint","release":"np","version":"npm run build","prebuild":"npm run lint && npm run clean","postbuild":"npm run copy:templates && npm run index:commands","typecheck":"tsc --noEmit","quick:test":"node --import=./tsnode.esm.js --enable-source-maps bin/test.ts","copy:templates":"copyfiles \"stubs/**/*.stub\" build","index:commands":"adonis-kit index build/commands","prepublishOnly":"npm run build"},"_npmUser":{"name":"tomgobich","email":"tom@tomgobich.com"},"prettier":"@adonisjs/prettier-config","repository":{"url":"git+https://github.com/adocasts/package-dto.git","type":"git"},"_npmVersion":"10.9.0","description":"Easily make and generate DTOs from Lucid Models","directories":{},"_nodeVersion":"22.11.0","dependencies":{"@japa/file-system":"^2.3.0"},"eslintConfig":{"extends":"@adonisjs/eslint-config/package"},"publishConfig":{"tag":"latest","access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^9.1.0","np":"^10.0.0","eslint":"^8.57.0","del-cli":"^5.1.0","ts-node":"^10.9.2","prettier":"^3.2.5","@swc/core":"^1.4.6","copyfiles":"^2.4.1","typescript":"^5.4.2","@types/node":"^20.11.25","@japa/assert":"^2.1.0","@japa/runner":"^3.1.1","@adonisjs/core":"^6.3.1","@adonisjs/lucid":"^21.1.0","@adonisjs/tsconfig":"^1.3.0","@adonisjs/assembler":"^7.2.3","@adonisjs/eslint-config":"^1.3.0","@adonisjs/prettier-config":"^1.3.0"},"peerDependencies":{"@adonisjs/core":"^6.2.0","@adonisjs/lucid":"^21.1.0"},"_npmOperationalInternal":{"tmp":"tmp/dto_0.0.8_1731539110337_0.9550906537125701","host":"s3://npm-registry-packages"}},"0.0.9":{"name":"@adocasts.com/dto","version":"0.0.9","keywords":["adonisjs","lucid","dto","generate","make"],"author":{"name":"tomgobich,adocasts.com"},"license":"MIT","_id":"@adocasts.com/dto@0.0.9","maintainers":[{"name":"tomgobich","email":"tom@tomgobich.com"}],"homepage":"https://github.com/adocasts/package-dto#readme","bugs":{"url":"https://github.com/adocasts/package-dto/issues"},"c8":{"exclude":["tests/**"],"reporter":["text","html"]},"np":{"tag":"latest","branch":"main","message":"chore(release): %s","anyBranch":false},"dist":{"shasum":"94129e81315f7057a3190278ca97881438a0cd10","tarball":"https://registry.npmjs.org/@adocasts.com/dto/-/dto-0.0.9.tgz","fileCount":40,"integrity":"sha512-iR11StngVFtBz411imdQfz2DgIlgj5T0X3u1OZgOqKJmyUH4oQusxLtu/3sz0nYPR04NF4XdX+zGS0lGkLXBGw==","signatures":[{"sig":"MEQCIDgG3XyTHc98yFnbg9z2OYLOWsAQrve11OKinFtIAMoyAiAN//gRQE0q1dQ7wGhxRGMY272f51ePmIUdu1boryyUAA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":50688},"type":"module","engines":{"node":">=20.6.0"},"exports":{".":"./build/index.js","./base":"./build/src/base/main.js","./types":"./build/src/types.js","./commands":"./build/commands/main.js","./paginator":"./build/src/paginator/main.js"},"gitHead":"4e68cafb8b37cd6181c2fc2797b5c2521f374c06","scripts":{"lint":"eslint . --ext=.ts","test":"c8 npm run quick:test","build":"tsc","clean":"del-cli build","format":"prettier --write .","pretest":"npm run lint","release":"np","version":"npm run build","prebuild":"npm run lint && npm run clean","postbuild":"npm run copy:templates && npm run index:commands","typecheck":"tsc --noEmit","quick:test":"node --import=./tsnode.esm.js --enable-source-maps bin/test.ts","copy:templates":"copyfiles \"stubs/**/*.stub\" build","index:commands":"adonis-kit index build/commands","prepublishOnly":"npm run build"},"_npmUser":{"name":"tomgobich","email":"tom@tomgobich.com"},"prettier":"@adonisjs/prettier-config","repository":{"url":"git+https://github.com/adocasts/package-dto.git","type":"git"},"_npmVersion":"10.9.0","description":"Easily make and generate DTOs from Lucid Models","directories":{},"_nodeVersion":"22.11.0","dependencies":{"@japa/file-system":"^2.3.0"},"eslintConfig":{"extends":"@adonisjs/eslint-config/package"},"publishConfig":{"tag":"latest","access":"public"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^9.1.0","np":"^10.0.0","eslint":"^8.57.0","del-cli":"^5.1.0","ts-node":"^10.9.2","prettier":"^3.2.5","@swc/core":"^1.4.6","copyfiles":"^2.4.1","typescript":"^5.4.2","@types/node":"^20.11.25","@japa/assert":"^2.1.0","@japa/runner":"^3.1.1","@adonisjs/core":"^6.3.1","@adonisjs/lucid":"^21.1.0","@adonisjs/tsconfig":"^1.3.0","@adonisjs/assembler":"^7.2.3","@adonisjs/eslint-config":"^1.3.0","@adonisjs/prettier-config":"^1.3.0"},"peerDependencies":{"@adonisjs/core":"^6.2.0","@adonisjs/lucid":"^21.1.0"},"_npmOperationalInternal":{"tmp":"tmp/dto_0.0.9_1731539920450_0.16122028589202997","host":"s3://npm-registry-packages"}},"0.0.10":{"name":"@adocasts.com/dto","description":"Easily make and generate DTOs from Lucid Models","version":"0.0.10","engines":{"node":">=20.6.0"},"type":"module","exports":{".":"./build/index.js","./types":"./build/src/types.js","./commands":"./build/commands/main.js","./base":"./build/src/base/main.js","./paginator":"./build/src/paginator/main.js"},"scripts":{"clean":"del-cli build","copy:templates":"copyfiles \"stubs/**/*.stub\" build","typecheck":"tsc --noEmit","lint":"eslint . --ext=.ts","format":"prettier --write .","quick:test":"node --import=./tsnode.esm.js --enable-source-maps bin/test.ts","pretest":"npm run lint","test":"c8 npm run quick:test","prebuild":"npm run lint && npm run clean","build":"tsc","postbuild":"npm run copy:templates && npm run index:commands","release":"np","version":"npm run build","prepublishOnly":"npm run build","index:commands":"adonis-kit index build/commands"},"devDependencies":{"@adonisjs/assembler":"^7.2.3","@adonisjs/core":"^6.3.1","@adonisjs/eslint-config":"^1.3.0","@adonisjs/lucid":"^21.1.0","@adonisjs/prettier-config":"^1.3.0","@adonisjs/tsconfig":"^1.3.0","@japa/assert":"^2.1.0","@japa/runner":"^3.1.1","@swc/core":"^1.4.6","@types/node":"^20.11.25","c8":"^9.1.0","copyfiles":"^2.4.1","del-cli":"^5.1.0","eslint":"^8.57.0","np":"^10.0.0","prettier":"^3.2.5","ts-node":"^10.9.2","typescript":"^5.4.2"},"dependencies":{"@japa/file-system":"^2.3.0","luxon":"^3.6.1"},"peerDependencies":{"@adonisjs/core":"^6.2.0","@adonisjs/lucid":"^21.1.0"},"author":{"name":"tomgobich,adocasts.com"},"license":"MIT","homepage":"https://github.com/adocasts/package-dto#readme","repository":{"type":"git","url":"git+https://github.com/adocasts/package-dto.git"},"bugs":{"url":"https://github.com/adocasts/package-dto/issues"},"keywords":["adonisjs","lucid","dto","generate","make"],"eslintConfig":{"extends":"@adonisjs/eslint-config/package"},"prettier":"@adonisjs/prettier-config","publishConfig":{"access":"public","tag":"latest"},"np":{"message":"chore(release): %s","tag":"latest","branch":"main","anyBranch":false},"c8":{"reporter":["text","html"],"exclude":["tests/**"]},"_id":"@adocasts.com/dto@0.0.10","gitHead":"cc1918f6b69faf8d24b91b2ea3aea46bc5425f7a","_nodeVersion":"22.11.0","_npmVersion":"11.1.0","dist":{"integrity":"sha512-6QdHk9Jjfy/nJECjXnEYxkttp6cBQ5gBLVJPL51dr0FiH4oPrUVnkH+KsTw02A8dz1TYKMvPsu3YD9Pdu1JEcw==","shasum":"fbef7eec3cedec94bcffa29628f587ee231f393d","tarball":"https://registry.npmjs.org/@adocasts.com/dto/-/dto-0.0.10.tgz","fileCount":48,"unpackedSize":69580,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDhC/T0c/r4hVpHWqPMq7Yh3luj7PKN8/AzHTm79E9e9gIgadZCXhwGvQWHuUZfxso1eenICR2tODMPjVgG9v7TvX0="}]},"_npmUser":{"name":"tomgobich","email":"tom@tomgobich.com","actor":{"name":"tomgobich","email":"tom@tomgobich.com","type":"user"}},"directories":{},"maintainers":[{"name":"tomgobich","email":"tom@tomgobich.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dto_0.0.10_1750642058908_0.9536833794393427"},"_hasShrinkwrap":false}},"time":{"created":"2024-06-10T00:35:08.598Z","modified":"2025-06-23T01:27:39.298Z","0.0.1":"2024-06-10T00:35:08.829Z","0.0.2":"2024-06-16T00:34:16.045Z","0.0.3":"2024-06-16T00:41:08.286Z","0.0.4":"2024-07-25T00:36:30.492Z","0.0.5-0":"2024-07-25T03:42:38.543Z","0.0.6":"2024-07-25T11:45:38.899Z","0.0.7":"2024-11-08T00:17:44.407Z","0.0.8":"2024-11-13T23:05:10.577Z","0.0.9":"2024-11-13T23:18:40.675Z","0.0.10":"2025-06-23T01:27:39.073Z"},"bugs":{"url":"https://github.com/adocasts/package-dto/issues"},"author":{"name":"tomgobich,adocasts.com"},"license":"MIT","homepage":"https://github.com/adocasts/package-dto#readme","keywords":["adonisjs","lucid","dto","generate","make"],"repository":{"type":"git","url":"git+https://github.com/adocasts/package-dto.git"},"description":"Easily make and generate DTOs from Lucid Models","maintainers":[{"name":"tomgobich","email":"tom@tomgobich.com"}],"readme":"# @adocasts.com/dto\n\n> Easily make and generate DTOs and validators from Lucid Models\n\n[![gh-workflow-image]][gh-workflow-url] [![npm-image]][npm-url] ![][typescript-image] [![license-image]][license-url]\n\nConverting Lucid Models to DTO files can be a tedious task.\nThis package aims to make it a little less so\nby reading your model's property definitions and porting them to a DTO.\nWill it be perfect? Likely not, but it should help cut back on the\nrepetition needed to complete the task.\n\n## Installation\n\nYou can easily install and configure via the Ace CLI's `add` command.\n\n```shell\nnode ace add @adocasts.com/dto\n```\n\n##### Manual Install & Configure\n\nYou can also manually install and configure if you'd prefer\n\n```shell\nnpm install @adocasts.com/dto\n```\n\n```shell\nnode ace configure @adocasts.com/dto\n```\n\n##### Define DTO Import Path\n\nThe generated DTOs will use `#dtos/*` for relationship imports within the DTOs.\nAs such, we recommend defining this import path within your `package.json`\n\n```json\n\"imports\": {\n  \"#dtos/*\": \"./app/dtos/*.js\"\n}\n```\n\n## Generate DTOs Command\n\nWant to generate DTOs for all your models in one fell swoop? This is the command for you!\n\n```shell\nnode ace generate:dtos\n```\n\nThis will read all of your model files, collecting their properties and types.\nIt'll then convert those property's types into serialization-safe types\nand relationships into their DTO representations.\n\nYou can also generate validators alongside DTOs by using the `--validator` flag:\n\n```shell\nnode ace generate:dtos --validator\n```\n\n```\nFile Tree                       Class\n------------------------------------------------\n└── app/\n    ├── dtos/\n    │   ├── account.ts          AccountDto\n    │   ├── account_group.ts    AccountGroupDto\n    │   ├── account_type.ts     AccountTypeDto\n    │   ├── income.ts           IncomeDto\n    │   ├── payee.ts            PayeeDto\n    │   └── user.ts             UserDto\n    └── models/\n        ├── account.ts          Account\n        ├── account_group.ts    AccountGroup\n        ├── account_type.ts     AccountType\n        ├── income.ts           Income\n        ├── payee.ts            Payee\n        └── user.ts             User\n```\n\n- Gets a list of your model files from the location defined within your `adonisrc.ts` file\n- Reads those files as plaintext, filering down to just property definitions\n- Determines the property name, it's types, whether it's a relationship, and if it's optionally modified `?`\n- Converts those model types into serialized representations (currently a very loose conversion)\n  - Note, at present, this does not account for serialization behaviors defined on the model property (like `serializeAs`)\n- Creates DTO property definitions from those conversions\n- Prepares constructor value setters for each property\n- Collects needed imports for relationships\n- Generates the DTO file\n  - Note, if a file already exists at the DTOs determined location it will be skipped\n\n## Make DTO Command\n\nWant to make a plain DTO file, or a single DTO from a single Model? This is the command for you!\n\nTo make a DTO named `AccountDto` within a file located at `dto/account.ts`, we can run the following:\n\n```shell\nnode ace make:dto account\n```\n\nThis will check to see if there is a model named `Account`.\nIf a model is found, it will use that model's property definitions to generate the `AccountDto`.\nOtherwise, it'll generate just a `AccountDto` file with an empty class inside it.\n\nYou can also generate a validator alongside the DTO by using the `--validator` flag:\n\n```shell\nnode ace make:dto account --validator\n```\n\nThis will create both a DTO and a validator for the Account model.\n\n```\nFile Tree                       Class\n------------------------------------------------\n└── app/\n    ├── dtos/\n    │   ├── account.ts          AccountDto\n    └── models/\n        ├── account.ts          Account\n```\n\n### What If There Isn't An Account Model?\n\nAs mentioned above, a plain `AccountDto` class will be generated within a new `dto/account.ts` file, which will look like the below.\n\n```ts\nexport default class AccountDto {}\n```\n\n#### Specifying A Different Model\n\nIf the DTO and Model names don't match, you can specify a specific Model to use via the `--model` flag.\n\n```shell\nnode ace make:dto account --model=main_account\n```\n\nNow instead of looking for a model named `Account` it'll instead\nlook for `MainAccount` and use it to create a DTO named `AccountDto`.\n\n## Make Validator Command\n\nWant to make a validator for a model? This command works similarly to the `make:dto` command:\n\n```shell\nnode ace make:validators account\n```\n\nThis will check to see if there is a model named `Account`.\nIf a model is found, it will use that model's property definitions to generate the `accountValidator`.\nOtherwise, it'll generate just a plain validator file with an empty schema.\n\n```\nFile Tree                       Variable\n------------------------------------------------\n└── app/\n    ├── validators/\n    │   ├── account.ts          accountValidator\n    └── models/\n        ├── account.ts          Account\n```\n\n#### Specifying A Different Model\n\nJust like with DTOs, you can specify a different model:\n\n```shell\nnode ace make:validators account --model=main_account\n```\n\n## Generate Validators Command\n\nWant to generate validators for all your models in one fell swoop? This command works similarly to `generate:dtos`:\n\n```shell\nnode ace generate:validators\n```\n\nThis will read all of your model files, collecting their properties and types.\nIt'll then convert those property's types into VineJS validator rules.\n\n```\nFile Tree                       Variable\n------------------------------------------------\n└── app/\n    ├── validators/\n    │   ├── account.ts          accountValidator\n    │   ├── account_group.ts    accountGroupValidator\n    │   ├── account_type.ts     accountTypeValidator\n    │   ├── income.ts           incomeValidator\n    │   ├── payee.ts            payeeValidator\n    │   └── user.ts             userValidator\n    └── models/\n        ├── account.ts          Account\n        ├── account_group.ts    AccountGroup\n        ├── account_type.ts     AccountType\n        ├── income.ts           Income\n        ├── payee.ts            Payee\n        └── user.ts             User\n```\n\n## BaseDto Helpers\n\nNewly added in v0.0.4, we now include either a `BaseDto` or `BaseModelDto` depeneding on whether we're generating your DTO from a model or not.\nBoth of these bases include a helper called `fromArray`. With this, you can pass in an array of source objects.\nWe'll then loop over them and pass each into a new constructor. This does run with the assumption that you'll populate properties within your DTO constructors.\n\nHere's a quick example\n\n```ts\nclass Test extends BaseModel {\n  @column()\n  declare id: number\n}\n\nclass TestDto extends BaseModelDto {\n  declare id: number\n\n  constructor(instance: Test) {\n    super()\n    this.id = instance.id\n  }\n}\n\nconst tests = await Test.createMany([{ id: 1 }, { id: 2 }, { id: 3 }])\n\nconst dtoArray = TestDto.fromArray(tests)\n// [TestDto, TestDto, TestDto]\n```\n\nAdditionally, `BaseModelDto` also includes a `fromPaginator` helper. This allows you to pass in an instance of the `ModelPaginator` to be converted into a\n`SimplePaginatorDto` we have defined within this package. You can also pass in a URL range start and end and we'll generate those URLs for you during the conversion.\n\nHere's a simple example\n\n```ts\nclass Test extends BaseModel {\n  @column()\n  declare id: number\n}\n\nclass TestDto extends BaseModelDto {\n  declare id: number\n\n  constructor(instance: Test) {\n    super()\n    this.id = instance.id\n  }\n}\n\nconst tests = await Test.createMany([{ id: 1 }, { id: 2 }, { id: 3 }])\n\nconst paginator = await Test.query().paginate(1, 2)\nconst paginatorDto = TestDto.fromPaginator(paginator, { start: 1, end: 2 })\n/**\n * {\n *    data: TestDto[],\n *    meta: SimplePaginatorDtoMetaContract\n * }\n */\n\nconst paginationUrls = paginatorDto.meta.pagesInRange\n/**\n * [\n *    {\n *      url: '/?page=1',\n *      page: 1,\n *      isActive: true\n *    },\n *    {\n *      url: '/?page=2',\n *      page: 2,\n *      isActive: false\n *    },\n * ]\n */\n```\n\nIf, for example, you're using something like Inertia, you can then type your props accordingly\n\n```ts\nimport { SimplePaginatorDtoContract } from '@adocasts.com/dto/types'\nimport DifficultyDto from '#dtos/difficulty'\n\nconst props = defineProps<{\n  paginated: SimplePaginatorDtoContract<DifficultyDto>\n}>()\n\nconst rows = props.paginated.data\nconst info = props.paginated.meta\nconst urls = props.paginated.meta.pagesInRange\n```\n\n## Things To Note\n\n- At present we assume the Model's name from the file name of the model.\n- There is NOT currently a setting to change the output directory of the DTOs\n- Due to reflection limitations, we're reading Models as plaintext. I'm no TypeScript wiz, so if you know of a better approach, I'm all ears!\n  - Since we're reading as plaintext\n    - Currently we're omitting decorators and their options\n\n## Example\n\nSo, we've use account as our example throughout this guide,\nso let's end by taking a look at what this Account Model looks like!\n\n##### The Account Model\n\n```ts\n// app/models/account.ts\n\nimport { DateTime } from 'luxon'\nimport { BaseModel, belongsTo, column, computed, hasMany, hasOne } from '@adonisjs/lucid/orm'\nimport User from './user.js'\nimport type { BelongsTo, HasMany, HasOne } from '@adonisjs/lucid/types/relations'\nimport AccountType from '#models/account_type'\nimport Payee from '#models/payee'\nimport Stock from '#models/stock'\nimport Transaction from '#models/transaction'\nimport AccountTypeService from '#services/account_type_service'\nimport { columnCurrency } from '#start/orm/column'\nimport type { AccountGroupConfig } from '#config/account'\n\nexport default class Account extends BaseModel {\n  // region Columns\n\n  @column({ isPrimary: true })\n  declare id: number\n\n  @column()\n  declare userId: number\n\n  @column()\n  declare accountTypeId: number\n\n  @column()\n  declare name: string\n\n  @column()\n  declare note: string\n\n  @column.date()\n  declare dateOpened: DateTime | null\n\n  @column.date()\n  declare dateClosed: DateTime | null\n\n  @columnCurrency()\n  declare balance: number\n\n  @columnCurrency()\n  declare startingBalance: number\n\n  @column.dateTime({ autoCreate: true })\n  declare createdAt: DateTime\n\n  @column.dateTime({ autoCreate: true, autoUpdate: true })\n  declare updatedAt: DateTime\n\n  // endregion\n\n  // region Unmapped Properties\n\n  aggregations: Record<string, number> = {}\n\n  // endregion\n\n  // region Relationships\n\n  @belongsTo(() => User)\n  declare user: BelongsTo<typeof User>\n\n  @belongsTo(() => AccountType)\n  declare accountType: BelongsTo<typeof AccountType>\n\n  @hasOne(() => Payee)\n  declare payee: HasOne<typeof Payee>\n\n  @hasMany(() => Stock)\n  declare stocks: HasMany<typeof Stock>\n\n  @hasMany(() => Transaction)\n  declare transactions: HasMany<typeof Transaction>\n\n  // endregion\n\n  // region Computed Properties\n\n  @computed()\n  get accountGroup(): AccountGroupConfig {\n    return AccountTypeService.getAccountTypeGroup(this.accountTypeId)\n  }\n\n  @computed()\n  get isCreditIncrease(): boolean {\n    return AccountTypeService.isCreditIncreaseById(this.accountTypeId)\n  }\n\n  @computed()\n  get isBudgetable() {\n    return AccountTypeService.isBudgetable(this.accountTypeId)\n  }\n\n  @computed()\n  get balanceDisplay() {\n    return '$' + this.balance.toLocaleString('en-US')\n  }\n\n  // endregion\n}\n```\n\nIt's got\n\n- Column properties\n- Nullable properties\n- An unmapped property, which also contains a default value\n- Getters\n- Relationships\n\nLet's see what we get when we generate our DTO!\n\n```shell\nnode ace make:dto account\n```\n\n##### The Account DTO\n\n```ts\nimport { BaseModelDto } from '@adocasts.com/dto/base'\nimport Account from '#models/account'\nimport UserDto from '#dtos/user'\nimport AccountTypeDto from '#dtos/account_type'\nimport PayeeDto from '#dtos/payee'\nimport StockDto from '#dtos/stock'\nimport TransactionDto from '#dtos/transaction'\nimport { AccountGroupConfig } from '#config/account'\n\nexport default class AccountDto extends BaseModelDto {\n  declare id: number\n  declare userId: number\n  declare accountTypeId: number\n  declare name: string\n  declare note: string\n  declare dateOpened: string | null\n  declare dateClosed: string | null\n  declare balance: number\n  declare startingBalance: number\n  declare createdAt: string\n  declare updatedAt: string\n  aggregations: Record<string, number> = {}\n  declare user: UserDto | null\n  declare accountType: AccountTypeDto | null\n  declare payee: PayeeDto | null\n  declare stocks: StockDto[]\n  declare transactions: TransactionDto[]\n  declare accountGroup: AccountGroupConfig\n  declare isCreditIncrease: boolean\n  declare isBudgetable: boolean\n  declare balanceDisplay: string\n\n  constructor(account?: Account) {\n    super()\n\n    if (!account) return\n    this.id = account.id\n    this.userId = account.userId\n    this.accountTypeId = account.accountTypeId\n    this.name = account.name\n    this.note = account.note\n    this.dateOpened = account.dateOpened?.toISO()!\n    this.dateClosed = account.dateClosed?.toISO()!\n    this.balance = account.balance\n    this.startingBalance = account.startingBalance\n    this.createdAt = account.createdAt.toISO()!\n    this.updatedAt = account.updatedAt.toISO()!\n    this.aggregations = account.aggregations\n    this.user = account.user && new UserDto(account.user)\n    this.accountType = account.accountType && new AccountTypeDto(account.accountType)\n    this.payee = account.payee && new PayeeDto(account.payee)\n    this.stocks = StockDto.fromArray(account.stocks)\n    this.transactions = TransactionDto.fromArray(account.transactions)\n    this.accountGroup = account.accountGroup\n    this.isCreditIncrease = account.isCreditIncrease\n    this.isBudgetable = account.isBudgetable\n    this.balanceDisplay = account.balanceDisplay\n  }\n}\n```\n\nIt's got the\n\n- Needed imports (it'll try to get them all by also referencing the Model's imports)\n- Column properties from our Model\n- Nullable property's nullability\n- Unmapped property from our Model, plus it's default value\n- Relationships converted into DTO representations\n- Getters and their types, when specified. If types are inferred, the type will default to string or boolean if variable name starts with `is`\n- Constructor value setters for all of the above\n- A helper method `fromArray` that'll normalize to an empty array if need be\n\n## Example Validator\n\nLet's see what we get when we generate a validator for our Account model:\n\n```shell\nnode ace make:validator account\n```\n\n##### The Account Validator\n\n```ts\nimport vine from '@vinejs/vine'\nimport Account from '#models/account'\nimport { AccountGroupConfig } from '#config/account'\n\nexport const accountValidator = vine.compile(\n  vine.object({\n    id: vine.number(),\n    userId: vine.number(),\n    accountTypeId: vine.number(),\n    name: vine.string().trim(),\n    note: vine.string().trim(),\n    dateOpened: vine.string().datetime().optional(),\n    dateClosed: vine.string().datetime().optional(),\n    balance: vine.number(),\n    startingBalance: vine.number(),\n    createdAt: vine.string().datetime(),\n    updatedAt: vine.string().datetime(),\n    user: vine.object({}),\n    accountType: vine.object({}),\n    payee: vine.object({}),\n    stocks: vine.array(vine.object({})),\n    transactions: vine.array(vine.object({})),\n    accountGroup: vine.object({}),\n    isCreditIncrease: vine.boolean(),\n    isBudgetable: vine.boolean(),\n    balanceDisplay: vine.string().trim()\n  })\n)\n```\n\nIt's got:\n\n- Needed imports from the model\n- Validation rules for all model properties\n- Appropriate type conversions (e.g., DateTime to string().datetime())\n- Optional modifiers for nullable properties\n- Object and array validators for relationships\n\n## Using Generated Validators\n\nOnce you've generated a validator, you can use it in your controllers or routes to validate incoming data:\n\n```typescript\nimport { accountValidator } from '#validators/account'\nimport { HttpContext } from '@adonisjs/core/http'\n\nexport default class AccountsController {\n  async store({ request, response }: HttpContext) {\n    try {\n      // Validate the request data\n      const data = await accountValidator.validate(request.all())\n\n      // Create the account\n      const account = await Account.create(data)\n\n      // Return the account as a DTO\n      return response.created(new AccountDto(account))\n    } catch (error) {\n      // Handle validation errors\n      if (error.code === 'E_VALIDATION_ERROR') {\n        return response.unprocessableEntity(error.messages)\n      }\n\n      throw error\n    }\n  }\n}\n```\n\n[gh-workflow-image]: https://img.shields.io/github/actions/workflow/status/adocasts/package-dto/test.yml?style=for-the-badge\n[gh-workflow-url]: https://github.com/adocasts/package-dto/actions/workflows/test.yml 'Github action'\n[npm-image]: https://img.shields.io/npm/v/@adocasts.com/dto/latest.svg?style=for-the-badge&logo=npm\n[npm-url]: https://www.npmjs.com/package/@adocasts.com/dto/v/latest 'npm'\n[typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript\n[license-url]: LICENSE.md\n[license-image]: https://img.shields.io/github/license/adocasts/package-dto?style=for-the-badge\n","readmeFilename":"README.md"}