@famgia/omnify-types 0.0.42 → 0.0.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@famgia/omnify-types",
3
- "version": "0.0.42",
3
+ "version": "0.0.44",
4
4
  "description": "Shared TypeScript types for omnify-schema",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -132,6 +132,7 @@
132
132
  { "$ref": "#/definitions/BooleanProperty" },
133
133
  { "$ref": "#/definitions/TextProperty" },
134
134
  { "$ref": "#/definitions/DateTimeProperty" },
135
+ { "$ref": "#/definitions/TimestampProperty" },
135
136
  { "$ref": "#/definitions/JsonProperty" },
136
137
  { "$ref": "#/definitions/EnumProperty" },
137
138
  { "$ref": "#/definitions/EnumRefProperty" },
@@ -289,13 +290,38 @@
289
290
  "properties": {
290
291
  "type": {
291
292
  "type": "string",
292
- "enum": ["Date", "DateTime", "Time", "Timestamp"],
293
+ "enum": ["Date", "DateTime", "Time"],
293
294
  "description": "Date/Time type"
294
295
  }
295
296
  }
296
297
  }
297
298
  ]
298
299
  },
300
+ "TimestampProperty": {
301
+ "allOf": [
302
+ { "$ref": "#/definitions/BaseProperty" },
303
+ {
304
+ "type": "object",
305
+ "required": ["type"],
306
+ "properties": {
307
+ "type": {
308
+ "const": "Timestamp",
309
+ "description": "Timestamp type"
310
+ },
311
+ "useCurrent": {
312
+ "type": "boolean",
313
+ "default": false,
314
+ "description": "Use CURRENT_TIMESTAMP as default value (Laravel: useCurrent())"
315
+ },
316
+ "useCurrentOnUpdate": {
317
+ "type": "boolean",
318
+ "default": false,
319
+ "description": "Update to CURRENT_TIMESTAMP on row update (Laravel: useCurrentOnUpdate())"
320
+ }
321
+ }
322
+ }
323
+ ]
324
+ },
299
325
  "JsonProperty": {
300
326
  "allOf": [
301
327
  { "$ref": "#/definitions/BaseProperty" },
@@ -458,6 +484,20 @@
458
484
  "mappedBy": {
459
485
  "type": "string",
460
486
  "description": "Property name that is mapped by target"
487
+ },
488
+ "targets": {
489
+ "type": "array",
490
+ "items": { "type": "string" },
491
+ "description": "Target schema names for MorphTo (e.g., ['Post', 'Video'])"
492
+ },
493
+ "morphName": {
494
+ "type": "string",
495
+ "description": "Custom morph name for polymorphic relations"
496
+ },
497
+ "nullable": {
498
+ "type": "boolean",
499
+ "default": true,
500
+ "description": "Whether the relation columns are nullable (default: true for MorphTo)"
461
501
  }
462
502
  }
463
503
  }