2018-03-20 09:50:40 +08:00
|
|
|
<?php
|
|
|
|
|
2019-07-16 03:44:31 +08:00
|
|
|
namespace App\Contracts;
|
2018-03-20 09:50:40 +08:00
|
|
|
|
2018-03-20 10:01:32 +08:00
|
|
|
/**
|
2018-04-02 07:02:12 +08:00
|
|
|
* @property mixed $id
|
2018-04-08 09:52:12 +08:00
|
|
|
* @property bool $skip_mutator
|
2019-09-17 01:08:26 +08:00
|
|
|
*
|
2019-12-13 04:07:35 +08:00
|
|
|
* @method static Model create(array $attrs)
|
2019-12-02 22:57:35 +08:00
|
|
|
* @method static Model find(int $id)
|
2019-12-11 02:53:55 +08:00
|
|
|
* @method static Model select(array $array)
|
2019-11-27 22:19:20 +08:00
|
|
|
* @method static Model where(array $array)
|
2019-12-02 22:57:35 +08:00
|
|
|
* @method static Model firstOrCreate(array $where, array $array)
|
2019-11-27 22:19:20 +08:00
|
|
|
* @method static Model updateOrCreate(array $array, array $attrs)
|
|
|
|
* @method static truncate()
|
2019-12-11 02:53:55 +08:00
|
|
|
* @method Model orderBy(string $column, string $order)
|
|
|
|
* @method Model limit(int $limit)
|
|
|
|
* @method Model first()
|
2018-03-20 10:01:32 +08:00
|
|
|
*/
|
2018-03-20 09:50:40 +08:00
|
|
|
abstract class Model extends \Illuminate\Database\Eloquent\Model
|
|
|
|
{
|
2018-03-21 02:06:06 +08:00
|
|
|
public const ID_MAX_LENGTH = 12;
|
2018-04-08 09:52:12 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* For the factories, skip the mutators. Only apply to one instance
|
2018-08-27 00:40:04 +08:00
|
|
|
*
|
2018-04-08 09:52:12 +08:00
|
|
|
* @var bool
|
|
|
|
*/
|
|
|
|
public $skip_mutator = false;
|
2018-03-20 09:50:40 +08:00
|
|
|
}
|