@omnifyjp/omnify 1.1.0 → 1.1.1

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 (2) hide show
  1. package/package.json +6 -6
  2. package/types/schema.d.ts +11 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omnifyjp/omnify",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Schema-driven code generation for Laravel, TypeScript, and SQL",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -36,10 +36,10 @@
36
36
  "zod": "^3.24.0"
37
37
  },
38
38
  "optionalDependencies": {
39
- "@omnifyjp/omnify-darwin-arm64": "1.1.0",
40
- "@omnifyjp/omnify-darwin-x64": "1.1.0",
41
- "@omnifyjp/omnify-linux-x64": "1.1.0",
42
- "@omnifyjp/omnify-linux-arm64": "1.1.0",
43
- "@omnifyjp/omnify-win32-x64": "1.1.0"
39
+ "@omnifyjp/omnify-darwin-arm64": "1.1.1",
40
+ "@omnifyjp/omnify-darwin-x64": "1.1.1",
41
+ "@omnifyjp/omnify-linux-x64": "1.1.1",
42
+ "@omnifyjp/omnify-linux-arm64": "1.1.1",
43
+ "@omnifyjp/omnify-win32-x64": "1.1.1"
44
44
  }
45
45
  }
package/types/schema.d.ts CHANGED
@@ -192,6 +192,17 @@ export interface PropertyDefinition {
192
192
  primary?: boolean;
193
193
  hidden?: boolean;
194
194
  fillable?: boolean;
195
+ /**
196
+ * Mark field as translatable (Astrotomic/laravel-translatable).
197
+ * When true:
198
+ * - A `{model}_translations` table is auto-generated with FK + locale + translatable columns
199
+ * - The field remains in the main table as fallback value
200
+ * - Base model gets `use Translatable` trait + `implements TranslatableContract`
201
+ * - A `{ModelName}Translation` model is generated with `$timestamps = false`
202
+ *
203
+ * Only allowed on: String, Text, MediumText, LongText, Email, EnumRef, Json.
204
+ */
205
+ translatable?: boolean;
195
206
  placeholder?: LocalizedString;
196
207
  /** Per-field overrides for compound types. */
197
208
  fields?: Record<string, CompoundFieldOverride>;