Remove fcLinkId from LinkCodes

This commit is contained in:
Daniel_I_Am 2020-08-29 12:18:44 +02:00
parent 330d1ba49c
commit d789b64733
No known key found for this signature in database
GPG Key ID: 80C428FCC9743E84
3 changed files with 0 additions and 12 deletions

View File

@ -24,11 +24,6 @@ class FreeCompanyLink extends Model
return $this->hasMany(FreeCompanyRank::class, 'freeCompanyLinkId'); return $this->hasMany(FreeCompanyRank::class, 'freeCompanyLinkId');
} }
public function linkCodes()
{
return $this->hasMany(LinkCode::class, 'freeCompanyLinkId');
}
public function userLinks() public function userLinks()
{ {
return $this->hasMany(UserLink::class, 'freeCompanyLinkId'); return $this->hasMany(UserLink::class, 'freeCompanyLinkId');

View File

@ -9,7 +9,6 @@ class LinkCode extends Model
public $timestamps = false; public $timestamps = false;
protected $fillable = [ protected $fillable = [
'freeCompanyLinkId',
'lodestoneId', 'lodestoneId',
'discordUserId', 'discordUserId',
'websiteUserId', 'websiteUserId',
@ -20,9 +19,4 @@ class LinkCode extends Model
protected $casts = [ protected $casts = [
'expires' => 'datetime' 'expires' => 'datetime'
]; ];
public function freeCompanyLink()
{
return $this->belongsTo(FreeCompanyLink::class, 'freeCompanyLinkId');
}
} }

View File

@ -15,7 +15,6 @@ class CreateLinkCodesTable extends Migration
{ {
Schema::create('link_codes', function (Blueprint $table) { Schema::create('link_codes', function (Blueprint $table) {
$table->id(); $table->id();
$table->foreignId('freeCompanyLinkId')->constrained('free_company_links');
$table->bigInteger('lodestoneId'); $table->bigInteger('lodestoneId');
$table->bigInteger('discordUserId')->nullable(); $table->bigInteger('discordUserId')->nullable();
$table->bigInteger('websiteUserId')->nullable(); $table->bigInteger('websiteUserId')->nullable();