feat: add article and production modules
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace plugin\produce\app\model;
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
|
||||
class SpecificRule extends BaseModel
|
||||
{
|
||||
protected $table = 'produce_specific_rule';
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'rule_name',
|
||||
'rule_pattern',
|
||||
'rule_type',
|
||||
'apply_mode',
|
||||
'match_field',
|
||||
'is_enabled',
|
||||
'step_ids',
|
||||
'sort',
|
||||
'remark',
|
||||
'created_by',
|
||||
'updated_by',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'deleted_at',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'rule_type' => 'integer',
|
||||
'is_enabled' => 'integer',
|
||||
'step_ids' => 'array',
|
||||
'sort' => 'integer',
|
||||
'created_by' => 'integer',
|
||||
'updated_by' => 'integer',
|
||||
'created_at' => 'integer',
|
||||
'updated_at' => 'integer',
|
||||
'deleted_at' => 'integer',
|
||||
];
|
||||
|
||||
public function getNameAttribute(): string
|
||||
{
|
||||
return (string) $this->rule_name;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user