浏览代码

Update Profile model, add aliases relation

Daniel Supernault 1 年之前
父节点
当前提交
dc7973de62
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      app/Profile.php

+ 6 - 1
app/Profile.php

@@ -7,6 +7,7 @@ use App\Util\Lexer\PrettyNumber;
 use App\HasSnowflakePrimary;
 use Illuminate\Database\Eloquent\{Model, SoftDeletes};
 use App\Services\FollowerService;
+use App\Models\ProfileAlias;
 
 class Profile extends Model
 {
@@ -369,9 +370,13 @@ class Profile extends Model
 		return $this->hasMany(Story::class);
 	}
 
-
 	public function reported()
 	{
 		return $this->hasMany(Report::class, 'object_id');
 	}
+
+	public function aliases()
+	{
+		return $this->hasMany(ProfileAlias::class);
+	}
 }