This commit is contained in:
2022-09-09 16:35:41 +08:00
parent af2304dece
commit 66fbd56613
3 changed files with 31 additions and 7 deletions

View File

@@ -6,5 +6,5 @@ use think\Model;
class Order extends Model
{
protected $autoWriteTimestamp = true;
}

15
app/model/Student.php Normal file
View File

@@ -0,0 +1,15 @@
<?php
namespace app\model;
use think\Model;
use think\model\relation\HasMany;
class Student extends Model
{
public function orders(): HasMany
{
return $this->hasMany(Order::class);
}
}