@omnifyjp/ts 1.3.4 → 2.0.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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generates the
|
|
2
|
+
* Generates the BaseModel class.
|
|
3
3
|
* Morph map registration is handled exclusively by OmnifyServiceProvider.
|
|
4
4
|
*/
|
|
5
5
|
import type { GeneratedFile, PhpConfig } from './types.js';
|
|
6
|
-
/** Generate the
|
|
6
|
+
/** Generate the BaseModel class. */
|
|
7
7
|
export declare function generateBaseModel(config: PhpConfig): GeneratedFile[];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generates the
|
|
2
|
+
* Generates the BaseModel class.
|
|
3
3
|
* Morph map registration is handled exclusively by OmnifyServiceProvider.
|
|
4
4
|
*/
|
|
5
5
|
import { baseFile } from './types.js';
|
|
6
|
-
/** Generate the
|
|
6
|
+
/** Generate the BaseModel class. */
|
|
7
7
|
export function generateBaseModel(config) {
|
|
8
8
|
const baseNamespace = config.models.baseNamespace;
|
|
9
9
|
const content = `<?php
|
|
@@ -21,7 +21,7 @@ namespace ${baseNamespace};
|
|
|
21
21
|
|
|
22
22
|
use Illuminate\\Database\\Eloquent\\Model;
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
class BaseModel extends Model
|
|
25
25
|
{
|
|
26
26
|
}
|
|
27
27
|
`;
|