Skip to content

Commit 39839b4

Browse files
committed
调整type
1 parent b86f0bf commit 39839b4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/model/type/Date.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44

55
namespace think\model\type;
66

7+
use think\model\contract\Modelable;
8+
79
class Date extends DateTime
810
{
911
protected $data;
1012

11-
public static function from(mixed $value)
13+
public static function from(mixed $value, Modelable $model)
1214
{
1315
$static = new static();
1416
$static->data($value, 'Y-m-d');

src/model/type/DateTime.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44

55
namespace think\model\type;
66

7+
use think\model\contract\Modelable;
78
use think\model\contract\Typeable;
89

910
class DateTime implements Typeable
1011
{
1112
protected $data;
1213

13-
public static function from(mixed $value)
14+
public static function from(mixed $value, Modelable $model)
1415
{
1516
$static = new static();
1617
$static->data($value, 'Y-m-d H:i:s');

0 commit comments

Comments
 (0)