no message
This commit is contained in:
parent
94dacf4b97
commit
4cdf812b55
22
app/Models/Article.php
Executable file
22
app/Models/Article.php
Executable file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Blade extends Model
|
||||
{
|
||||
protected $table = 'blade';
|
||||
public $timestamps = false;
|
||||
|
||||
public static function _listKey()
|
||||
{
|
||||
$aSelf = self::all()->toArray();
|
||||
|
||||
foreach ($aSelf as &$aSelfRow) {
|
||||
unset($aSelfRow["content"]);
|
||||
}
|
||||
|
||||
return $aSelf;
|
||||
}
|
||||
}
|
||||
24
app/Models/ArticleOption.php
Executable file
24
app/Models/ArticleOption.php
Executable file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Article extends Model
|
||||
{
|
||||
protected $table = 'article';
|
||||
// public $timestamps = false;
|
||||
|
||||
// public static function _listKey()
|
||||
// {
|
||||
// $aSelf = self::all()->toArray();
|
||||
//
|
||||
// foreach ($aSelf as &$aSelfRow) {
|
||||
// unset($aSelfRow["content"]);
|
||||
// }
|
||||
//
|
||||
// return $aSelf;
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
30
app/Services/TG/Hook/Mod/Article.php
Normal file
30
app/Services/TG/Hook/Mod/Article.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\TG\Hook\Mod;
|
||||
|
||||
use App\Models\BladeJctj as ModelBladeJctj;
|
||||
use App\Services\TG\Hook\Dog;
|
||||
|
||||
|
||||
class Jctj extends Base {
|
||||
|
||||
private $oDog;
|
||||
|
||||
public function __construct($aUpdate)
|
||||
{
|
||||
|
||||
$this->oDog = new Dog(new ModelBladeJctj());
|
||||
$this->oDog->_setPrimaryKey("id"); // 可选,默认id
|
||||
$this->oDog->_setStrField(["content"]); // 可选,指定长文本字段
|
||||
$this->oDog->_setThisName("jctj"); // 必须,me用,正常就是类名,只不过后期没准改名,所以就这里写死
|
||||
|
||||
}
|
||||
|
||||
public function __call($sName, $aArg)
|
||||
{
|
||||
|
||||
return $this->oDog->$sName($aArg[0]);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user