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