From b018adf240679ec59a7344e30be39400f1ecd8af Mon Sep 17 00:00:00 2001 From: vantezzen Date: Thu, 22 Aug 2019 11:12:36 +0200 Subject: Initial commit --- app/Models/Traits/NoTimestamp.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 app/Models/Traits/NoTimestamp.js (limited to 'app/Models/Traits') diff --git a/app/Models/Traits/NoTimestamp.js b/app/Models/Traits/NoTimestamp.js new file mode 100644 index 0000000..edd07f0 --- /dev/null +++ b/app/Models/Traits/NoTimestamp.js @@ -0,0 +1,16 @@ +'use strict' + +class NoTimestamp { + register (Model) { + Object.defineProperties(Model, { + createdAtColumn: { + get: () => null, + }, + updatedAtColumn: { + get: () => null, + } + }) + } +} + +module.exports = NoTimestamp -- cgit v1.2.3-70-g09d2