日志增加索引
This commit is contained in:
@@ -19,15 +19,16 @@ class Log extends Model
|
||||
];
|
||||
|
||||
const TYPE_FREEZECOUPON = 'freezecoupon';
|
||||
const TYPE_DESTROY = 'destroy';
|
||||
const TYPE_QUERY = 'query';
|
||||
const TYPE_GRANT = 'grant';
|
||||
const TYPES = [
|
||||
const TYPE_DESTROY = 'destroy';
|
||||
const TYPE_QUERY = 'query';
|
||||
const TYPE_GRANT = 'grant';
|
||||
const TYPES = [
|
||||
self::TYPE_FREEZECOUPON => '核销',
|
||||
self::TYPE_DESTROY => '作废',
|
||||
self::TYPE_QUERY => '查询',
|
||||
self::TYPE_GRANT => '发券',
|
||||
self::TYPE_DESTROY => '作废',
|
||||
self::TYPE_QUERY => '查询',
|
||||
self::TYPE_GRANT => '发券',
|
||||
];
|
||||
|
||||
public function __construct(array $attributes = [])
|
||||
{
|
||||
parent::__construct($attributes);
|
||||
@@ -39,9 +40,9 @@ class Log extends Model
|
||||
Schema::create($this->table, function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('path', 255);
|
||||
$table->string('method', 15);
|
||||
$table->string('method', 15)->index();
|
||||
$table->text('in_source');
|
||||
$table->string('type', 20);
|
||||
$table->string('type', 20)->index();
|
||||
$table->text('out_source')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user