123456789101112131415161718192021222324252627282930313233 |
- <?php
- declare(strict_types=1);
- namespace App\Model;
- use Hyperf\DbConnection\Model\Model;
- /**
- */
- class Rule extends Model
- {
- /**
- * The table associated with the model.
- */
- protected ?string $table = 'rule';
- /**
- * The attributes that are mass assignable.
- */
- protected array $fillable = [];
- /**
- * The attributes that should be cast to native types.
- */
- protected array $casts = [];
- public function arts()
- {
- return $this->hasMany(Article::class,'rule_id','id');
- }
- }
|