mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 22:41:27 +00:00
Add snowflake ids to Collection models
This commit is contained in:
parent
ba8cae362f
commit
4f14a7dd74
2 changed files with 20 additions and 0 deletions
|
@ -3,9 +3,19 @@
|
||||||
namespace App;
|
namespace App;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Pixelfed\Snowflake\HasSnowflakePrimary;
|
||||||
|
|
||||||
class Collection extends Model
|
class Collection extends Model
|
||||||
{
|
{
|
||||||
|
use HasSnowflakePrimary;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates if the IDs are auto-incrementing.
|
||||||
|
*
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
public $incrementing = false;
|
||||||
|
|
||||||
public function profile()
|
public function profile()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Profile::class);
|
return $this->belongsTo(Profile::class);
|
||||||
|
|
|
@ -3,9 +3,19 @@
|
||||||
namespace App;
|
namespace App;
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Pixelfed\Snowflake\HasSnowflakePrimary;
|
||||||
|
|
||||||
class CollectionItem extends Model
|
class CollectionItem extends Model
|
||||||
{
|
{
|
||||||
|
use HasSnowflakePrimary;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates if the IDs are auto-incrementing.
|
||||||
|
*
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
public $incrementing = false;
|
||||||
|
|
||||||
public function collection()
|
public function collection()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(Collection::class);
|
return $this->belongsTo(Collection::class);
|
||||||
|
|
Loading…
Reference in a new issue