<?php
declare (strict_types=1);
namespace App\System\Model;
use Hyperf\Database\Model\SoftDeletes;
use Mine\MineModel;
class SystemApp extends MineModel
{
use SoftDeletes;
public $incrementing = false;
protected $table = 'system_app';
protected $fillable = ['id', 'group_id', 'app_name', 'app_id', 'app_secret', 'status', 'description', 'created_by', 'updated_by', 'created_at', 'updated_at', 'deleted_at', 'remark'];
protected $casts = ['id' => 'integer', 'group_id' => 'integer', 'created_by' => 'integer', 'updated_by' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime'];
public function apis() : \Hyperf\Database\Model\Relations\BelongsToMany
{
return $this->belongsToMany(SystemApi::class, 'system_app_api', 'app_id', 'api_id');
}
public function appGroup() : \Hyperf\Database\Model\Relations\HasOne
{
return $this->hasOne(SystemAppGroup::class, 'id', 'group_id');
}
}