Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
meibuyu-micro
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
without authentication
meibuyu-micro
Commits
47512cd0
Commit
47512cd0
authored
May 08, 2020
by
王源
🎧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复模型生成中$timestamps的bug,修改注释
parent
b1c6d698
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
MakeModelCommand.php
src/Command/MakeModelCommand.php
+3
-3
No files found.
src/Command/MakeModelCommand.php
View file @
47512cd0
...
@@ -337,8 +337,8 @@ class MakeModelCommand extends HyperfCommand
...
@@ -337,8 +337,8 @@ class MakeModelCommand extends HyperfCommand
'array'
=>
'array'
,
'array'
=>
'array'
,
'json'
=>
'string'
,
'json'
=>
'string'
,
];
];
$properties
.=
" * @property "
.
(
isset
(
$pc
[
$v
[
'data_type'
]])
?
$pc
[
$v
[
'data_type'
]]
:
"string"
)
.
" $"
.
$name
.
"
\n
"
;
$properties
.=
" * @property "
.
(
isset
(
$pc
[
$v
[
'data_type'
]])
?
$pc
[
$v
[
'data_type'
]]
:
"string"
)
.
" $"
.
$name
.
(
$v
[
'column_comment'
]
?
" "
.
$v
[
'column_comment'
]
:
""
)
.
"
\n
"
;
if
(
$name
==
'created_at'
||
$name
==
'
cre
ated_at'
)
{
if
(
$name
==
'created_at'
||
$name
==
'
upd
ated_at'
)
{
$timestamps
++
;
$timestamps
++
;
}
}
if
(
$name
==
'deleted_at'
)
{
if
(
$name
==
'deleted_at'
)
{
...
@@ -347,7 +347,7 @@ class MakeModelCommand extends HyperfCommand
...
@@ -347,7 +347,7 @@ class MakeModelCommand extends HyperfCommand
if
(
in_array
(
$name
,
$filterFields
))
{
if
(
in_array
(
$name
,
$filterFields
))
{
continue
;
continue
;
}
}
$fillAble
.=
"
\t\t
'"
.
$name
.
"',"
.
(
$v
[
'column_comment'
]
?
"// "
.
$v
[
'column_comment'
]
:
""
)
.
"
\n
"
;
$fillAble
.=
"
\t\t
'"
.
$name
.
"',"
.
"
\n
"
;
if
(
isset
(
$this
->
cc
[
$v
[
'data_type'
]])
&&
$this
->
cc
[
$v
[
'data_type'
]]
!=
'string'
)
{
if
(
isset
(
$this
->
cc
[
$v
[
'data_type'
]])
&&
$this
->
cc
[
$v
[
'data_type'
]]
!=
'string'
)
{
$casts
.=
"
\t\t
'"
.
$name
.
"'=>'"
.
$this
->
cc
[
$v
[
'data_type'
]]
.
"',
\n
"
;
$casts
.=
"
\t\t
'"
.
$name
.
"'=>'"
.
$this
->
cc
[
$v
[
'data_type'
]]
.
"',
\n
"
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment