123456789101112131415161718192021222324252627282930313233 |
- <?php
- namespace App\Models;
- use Dcat\Admin\Traits\HasDateTimeFormatter;
- use Illuminate\Database\Eloquent\SoftDeletes;
- use Illuminate\Database\Eloquent\Model;
- class LibraryTask extends Model
- {
- use HasDateTimeFormatter;
- use SoftDeletes;
- protected $table = 'library_tasks';
- protected $guarded = [];
- const STATUS_WAIT = 1;
- const STATUS_IN = 2;
- const STATUS_SUCCESS = 3;
- const STATUS_FAIL = 4;
- const statusMaps = [
- 1 => '待导入',
- 2 => '正在导入',
- 3 => '导入成功',
- 4 => '读取失败',
- ];
- public function category()
- {
- return $this->belongsTo(LibraryCategory::class, 'category_id');
- }
- }
|