feat: implement intern blog management system with approval workflows and administrative feedback
This commit is contained in:
@@ -23,6 +23,9 @@ class Blog extends Model
|
||||
'published_at',
|
||||
'author_id',
|
||||
'category_id',
|
||||
'career_application_id',
|
||||
'intern_category',
|
||||
'admin_feedback',
|
||||
'tags',
|
||||
'view_count',
|
||||
'is_featured',
|
||||
@@ -53,6 +56,11 @@ class Blog extends Model
|
||||
return $this->belongsTo(User::class, 'author_id');
|
||||
}
|
||||
|
||||
public function careerApplication()
|
||||
{
|
||||
return $this->belongsTo(CareerApplication::class, 'career_application_id');
|
||||
}
|
||||
|
||||
public function category()
|
||||
{
|
||||
return $this->belongsTo(BlogCategory::class, 'category_id');
|
||||
|
||||
@@ -48,6 +48,14 @@ class CareerApplication extends Model
|
||||
return $this->hasMany(InternshipJournalEntry::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the blog posts written by this intern.
|
||||
*/
|
||||
public function blogs()
|
||||
{
|
||||
return $this->hasMany(Blog::class, 'career_application_id');
|
||||
}
|
||||
|
||||
protected static function booted()
|
||||
{
|
||||
static::saving(function ($model) {
|
||||
|
||||
Reference in New Issue
Block a user