Remove fcLinkId from LinkCodes
This commit is contained in:
parent
330d1ba49c
commit
d789b64733
@ -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');
|
||||||
|
|||||||
@ -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');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user