mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-24 03:59:08 -05:00
Shift to class based factories
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -46,6 +47,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Album extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Hootlex\Moderation\Moderatable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@@ -54,6 +55,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Application extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Moderatable;
|
||||
use Auditable;
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
@@ -37,6 +38,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class ApplicationImageProof extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The Attributes That Are Mass Assignable.
|
||||
*
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
@@ -37,6 +38,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class ApplicationUrlProof extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The Attributes That Are Mass Assignable.
|
||||
*
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Helpers\Bbcode;
|
||||
use App\Helpers\Linkify;
|
||||
use App\Traits\Auditable;
|
||||
@@ -49,6 +50,8 @@ use voku\helper\AntiXSS;
|
||||
*/
|
||||
class Article extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
@@ -43,6 +44,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Audit extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The Attributes That Are Mass Assignable.
|
||||
*
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -45,6 +46,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Ban extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -43,6 +44,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class BonExchange extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -50,6 +51,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class BonTransactions extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -39,6 +40,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Bookmark extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -77,6 +78,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Bot extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -49,6 +50,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class BotTransaction extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -55,6 +56,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Category extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -41,6 +42,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class ChatStatus extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
@@ -42,6 +43,8 @@ use Illuminate\Notifications\Notifiable;
|
||||
*/
|
||||
class Chatroom extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Notifiable;
|
||||
use Auditable;
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Helpers\Bbcode;
|
||||
use App\Helpers\Linkify;
|
||||
use App\Traits\Auditable;
|
||||
@@ -55,6 +56,8 @@ use voku\helper\AntiXSS;
|
||||
*/
|
||||
class Comment extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
@@ -38,6 +39,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class FailedLoginAttempt extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The Attributes That Are Mass Assignable.
|
||||
*
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -39,6 +40,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class FeaturedTorrent extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
@@ -42,6 +43,8 @@ use Illuminate\Notifications\Notifiable;
|
||||
*/
|
||||
class Follow extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Notifiable;
|
||||
use Auditable;
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Notifications\NewTopic;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@@ -70,6 +71,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Forum extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -37,5 +38,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class FreeleechToken extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
@@ -36,5 +37,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class GitUpdate extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -43,6 +44,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Graveyard extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -69,6 +70,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Group extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Kyslik\ColumnSortable\Sortable;
|
||||
|
||||
@@ -68,6 +69,8 @@ use Kyslik\ColumnSortable\Sortable;
|
||||
*/
|
||||
class History extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Sortable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -46,6 +47,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Image extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -49,6 +50,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Invite extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -43,6 +44,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Like extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Helpers\Bbcode;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use voku\helper\AntiXSS;
|
||||
@@ -48,6 +49,8 @@ use voku\helper\AntiXSS;
|
||||
*/
|
||||
class Message extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The Attributes That Are Mass Assignable.
|
||||
*
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -41,6 +42,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Note extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -43,6 +44,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Notification extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
//
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -40,6 +41,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Option extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/*** The Attributes That Are Mass Assignable.
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Helpers\BBCodeConverter;
|
||||
use App\Helpers\Markdown;
|
||||
use App\Traits\Auditable;
|
||||
@@ -41,6 +42,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Page extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Kyslik\ColumnSortable\Sortable;
|
||||
|
||||
@@ -61,6 +62,8 @@ use Kyslik\ColumnSortable\Sortable;
|
||||
*/
|
||||
class Peer extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Sortable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -43,6 +44,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Permission extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -35,6 +36,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class PersonalFreeleech extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -54,6 +55,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Playlist extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -39,6 +40,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class PlaylistTorrent extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Str;
|
||||
@@ -47,6 +48,8 @@ use Illuminate\Support\Str;
|
||||
*/
|
||||
class Poll extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Helpers\Bbcode;
|
||||
use App\Helpers\Linkify;
|
||||
use App\Traits\Auditable;
|
||||
@@ -48,6 +49,8 @@ use voku\helper\AntiXSS;
|
||||
*/
|
||||
class Post extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Helpers\Bbcode;
|
||||
use App\Helpers\Linkify;
|
||||
use App\Traits\Auditable;
|
||||
@@ -50,6 +51,8 @@ use voku\helper\AntiXSS;
|
||||
*/
|
||||
class PrivateMessage extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -58,6 +59,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Report extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -40,6 +41,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Resolution extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
@@ -57,6 +58,8 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
*/
|
||||
class Rss extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use SoftDeletes;
|
||||
use Auditable;
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use App\Traits\Encryptable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@@ -41,6 +42,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Seedbox extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Encryptable;
|
||||
use Auditable;
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -42,6 +43,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Subscription extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -35,6 +36,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Tag extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
@@ -33,6 +34,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class TagTorrent extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The Database Table Used By The Model.
|
||||
*
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -39,6 +40,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Thank extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Notifications\NewPost;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@@ -78,6 +79,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Topic extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
protected $casts = [
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Helpers\Bbcode;
|
||||
use App\Helpers\Linkify;
|
||||
use App\Helpers\MediaInfo;
|
||||
@@ -137,6 +138,8 @@ use voku\helper\AntiXSS;
|
||||
*/
|
||||
class Torrent extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Moderatable;
|
||||
use Sortable;
|
||||
use Auditable;
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Helpers\StringHelper;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -36,6 +37,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class TorrentFile extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* Indicates If The Model Should Be Timestamped.
|
||||
*
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Helpers\Bbcode;
|
||||
use App\Helpers\Linkify;
|
||||
use App\Notifications\NewComment;
|
||||
@@ -87,6 +88,8 @@ use voku\helper\AntiXSS;
|
||||
*/
|
||||
class TorrentRequest extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -43,6 +44,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class TorrentRequestBounty extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -39,6 +40,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class TorrentRequestClaim extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -45,6 +46,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class TwoStepAuth extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -39,6 +40,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Type extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
use HasFactory;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Helpers\Bbcode;
|
||||
use App\Helpers\Linkify;
|
||||
use App\Helpers\StringHelper;
|
||||
@@ -27,6 +28,8 @@ use voku\helper\AntiXSS;
|
||||
|
||||
class User extends Authenticatable
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Notifiable;
|
||||
use Achiever;
|
||||
use SoftDeletes;
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -38,6 +39,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class UserActivation extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
@@ -46,6 +47,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class UserAudible extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* Indicates If The Model Should Be Timestamped.
|
||||
*
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
@@ -44,6 +45,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class UserEcho extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* Indicates If The Model Should Be Timestamped.
|
||||
*
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -92,6 +93,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class UserNotification extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -112,6 +113,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class UserPrivacy extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -39,6 +40,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Voter extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
@@ -57,6 +58,8 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
*/
|
||||
class Warning extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use SoftDeletes;
|
||||
use Auditable;
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use App\Traits\Auditable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
@@ -44,6 +45,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Wish extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
use Auditable;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,16 +2,35 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\Album::class, function (Faker $faker) {
|
||||
return [
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class AlbumFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\Album::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'user_id' => function () {
|
||||
return factory(App\Models\User::class)->create()->id;
|
||||
return User::factory()->create()->id;
|
||||
},
|
||||
'name' => $faker->name,
|
||||
'description' => $faker->text,
|
||||
'imdb' => $faker->word,
|
||||
'cover_image' => $faker->word,
|
||||
'name' => $this->faker->name,
|
||||
'description' => $this->faker->text,
|
||||
'imdb' => $this->faker->word,
|
||||
'cover_image' => $this->faker->word,
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,18 +2,37 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\Application::class, function (Faker $faker) {
|
||||
return [
|
||||
'type' => $faker->word,
|
||||
'email' => $faker->unique()->safeEmail,
|
||||
'referrer' => $faker->text,
|
||||
'status' => $faker->boolean,
|
||||
'moderated_at' => $faker->dateTime(),
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class ApplicationFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\Application::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'type' => $this->faker->word,
|
||||
'email' => $this->faker->unique()->safeEmail,
|
||||
'referrer' => $this->faker->text,
|
||||
'status' => $this->faker->boolean,
|
||||
'moderated_at' => $this->faker->dateTime(),
|
||||
'moderated_by' => function () {
|
||||
return factory(App\Models\User::class)->create()->id;
|
||||
return User::factory()->create()->id;
|
||||
},
|
||||
'accepted_by' => $faker->randomNumber(),
|
||||
'accepted_by' => $this->faker->randomNumber(),
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,13 +2,32 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\ApplicationImageProof::class, function (Faker $faker) {
|
||||
return [
|
||||
use App\Models\Application;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class ApplicationImageProofFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\ApplicationImageProof::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'application_id' => function () {
|
||||
return factory(App\Models\Application::class)->create()->id;
|
||||
return Application::factory()->create()->id;
|
||||
},
|
||||
'image' => $faker->word,
|
||||
'image' => $this->faker->word,
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,13 +2,32 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\ApplicationUrlProof::class, function (Faker $faker) {
|
||||
return [
|
||||
use App\Models\Application;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class ApplicationUrlProofFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\ApplicationUrlProof::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'application_id' => function () {
|
||||
return factory(App\Models\Application::class)->create()->id;
|
||||
return Application::factory()->create()->id;
|
||||
},
|
||||
'url' => $faker->url,
|
||||
'url' => $this->faker->url,
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,16 +2,35 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\Article::class, function (Faker $faker) {
|
||||
return [
|
||||
'title' => $faker->word,
|
||||
'slug' => $faker->slug,
|
||||
'image' => $faker->word,
|
||||
'content' => $faker->text,
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class ArticleFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\Article::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'title' => $this->faker->word,
|
||||
'slug' => $this->faker->slug,
|
||||
'image' => $this->faker->word,
|
||||
'content' => $this->faker->text,
|
||||
'user_id' => function () {
|
||||
return factory(App\Models\User::class)->create()->id;
|
||||
return User::factory()->create()->id;
|
||||
},
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,16 +2,35 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\Audit::class, function (Faker $faker) {
|
||||
return [
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class AuditFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\Audit::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'user_id' => function () {
|
||||
return factory(App\Models\User::class)->create()->id;
|
||||
return User::factory()->create()->id;
|
||||
},
|
||||
'model_name' => $faker->word,
|
||||
'model_entry_id' => $faker->randomNumber(),
|
||||
'action' => $faker->word,
|
||||
'record' => $faker->word,
|
||||
'model_name' => $this->faker->word,
|
||||
'model_entry_id' => $this->faker->randomNumber(),
|
||||
'action' => $this->faker->word,
|
||||
'record' => $this->faker->word,
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,18 +2,37 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\Ban::class, function (Faker $faker) {
|
||||
return [
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class BanFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\Ban::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'owned_by' => function () {
|
||||
return factory(App\Models\User::class)->create()->id;
|
||||
return User::factory()->create()->id;
|
||||
},
|
||||
'created_by' => function () {
|
||||
return factory(App\Models\User::class)->create()->id;
|
||||
return User::factory()->create()->id;
|
||||
},
|
||||
'ban_reason' => $faker->text,
|
||||
'unban_reason' => $faker->text,
|
||||
'removed_at' => $faker->dateTime(),
|
||||
'ban_reason' => $this->faker->text,
|
||||
'unban_reason' => $this->faker->text,
|
||||
'removed_at' => $this->faker->dateTime(),
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,16 +2,34 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\BonExchange::class, function (Faker $faker) {
|
||||
return [
|
||||
'description' => $faker->text,
|
||||
'value' => $faker->randomNumber(),
|
||||
'cost' => $faker->randomNumber(),
|
||||
'upload' => $faker->boolean,
|
||||
'download' => $faker->boolean,
|
||||
'personal_freeleech' => $faker->boolean,
|
||||
'invite' => $faker->boolean,
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class BonExchangeFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\BonExchange::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'description' => $this->faker->text,
|
||||
'value' => $this->faker->randomNumber(),
|
||||
'cost' => $this->faker->randomNumber(),
|
||||
'upload' => $this->faker->boolean,
|
||||
'download' => $this->faker->boolean,
|
||||
'personal_freeleech' => $this->faker->boolean,
|
||||
'invite' => $this->faker->boolean,
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,25 +2,44 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\BonTransactions::class, function (Faker $faker) {
|
||||
return [
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class BonTransactionsFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\BonTransactions::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'itemID' => function () {
|
||||
return factory(App\Models\BonExchange::class)->create()->id;
|
||||
return BonExchange::factory()->create()->id;
|
||||
},
|
||||
'name' => $faker->name,
|
||||
'cost' => $faker->randomFloat(),
|
||||
'name' => $this->faker->name,
|
||||
'cost' => $this->faker->randomFloat(),
|
||||
'sender' => function () {
|
||||
return factory(App\Models\User::class)->create()->id;
|
||||
return User::factory()->create()->id;
|
||||
},
|
||||
'receiver' => function () {
|
||||
return factory(App\Models\User::class)->create()->id;
|
||||
return User::factory()->create()->id;
|
||||
},
|
||||
'torrent_id' => $faker->randomNumber(),
|
||||
'donation_id' => $faker->randomNumber(),
|
||||
'post_id' => $faker->randomNumber(),
|
||||
'comment' => $faker->text,
|
||||
'date_actioned' => $faker->dateTime(),
|
||||
'torrent_id' => $this->faker->randomNumber(),
|
||||
'donation_id' => $this->faker->randomNumber(),
|
||||
'post_id' => $this->faker->randomNumber(),
|
||||
'comment' => $this->faker->text,
|
||||
'date_actioned' => $this->faker->dateTime(),
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,15 +2,34 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\Bookmark::class, function (Faker $faker) {
|
||||
return [
|
||||
use App\Models\Torrent;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class BookmarkFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\Bookmark::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'user_id' => function () {
|
||||
return factory(App\Models\User::class)->create()->id;
|
||||
return User::factory()->create()->id;
|
||||
},
|
||||
'torrent_id' => function () {
|
||||
return factory(App\Models\Torrent::class)->create()->id;
|
||||
return Torrent::factory()->create()->id;
|
||||
},
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,31 +2,49 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\Bot::class, function (Faker $faker) {
|
||||
return [
|
||||
'position' => $faker->randomNumber(),
|
||||
'slug' => $faker->slug,
|
||||
'name' => $faker->name,
|
||||
'command' => $faker->word,
|
||||
'color' => $faker->word,
|
||||
'icon' => $faker->word,
|
||||
'emoji' => $faker->word,
|
||||
'info' => $faker->word,
|
||||
'about' => $faker->word,
|
||||
'help' => $faker->text,
|
||||
'active' => $faker->boolean,
|
||||
'is_protected' => $faker->boolean,
|
||||
'is_triviabot' => $faker->boolean,
|
||||
'is_nerdbot' => $faker->boolean,
|
||||
'is_systembot' => $faker->boolean,
|
||||
'is_casinobot' => $faker->boolean,
|
||||
'is_betbot' => $faker->boolean,
|
||||
'uploaded' => $faker->randomNumber(),
|
||||
'downloaded' => $faker->randomNumber(),
|
||||
'fl_tokens' => $faker->randomNumber(),
|
||||
'seedbonus' => $faker->randomFloat(),
|
||||
'invites' => $faker->randomNumber(),
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class BotFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\Bot::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'position' => $this->faker->randomNumber(),
|
||||
'slug' => $this->faker->slug,
|
||||
'name' => $this->faker->name,
|
||||
'command' => $this->faker->word,
|
||||
'color' => $this->faker->word,
|
||||
'icon' => $this->faker->word,
|
||||
'emoji' => $this->faker->word,
|
||||
'info' => $this->faker->word,
|
||||
'about' => $this->faker->word,
|
||||
'help' => $this->faker->text,
|
||||
'active' => $this->faker->boolean,
|
||||
'is_protected' => $this->faker->boolean,
|
||||
'is_triviabot' => $this->faker->boolean,
|
||||
'is_nerdbot' => $this->faker->boolean,
|
||||
'is_systembot' => $this->faker->boolean,
|
||||
'is_casinobot' => $this->faker->boolean,
|
||||
'is_betbot' => $this->faker->boolean,
|
||||
'uploaded' => $this->faker->randomNumber(),
|
||||
'downloaded' => $this->faker->randomNumber(),
|
||||
'fl_tokens' => $this->faker->randomNumber(),
|
||||
'seedbonus' => $this->faker->randomFloat(),
|
||||
'invites' => $this->faker->randomNumber(),
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,20 +2,39 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\BotTransaction::class, function (Faker $faker) {
|
||||
return [
|
||||
'type' => $faker->word,
|
||||
'cost' => $faker->randomFloat(),
|
||||
use App\Models\Bot;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class BotTransactionFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\BotTransaction::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'type' => $this->faker->word,
|
||||
'cost' => $this->faker->randomFloat(),
|
||||
'user_id' => function () {
|
||||
return factory(App\Models\User::class)->create()->id;
|
||||
return User::factory()->create()->id;
|
||||
},
|
||||
'bot_id' => function () {
|
||||
return factory(App\Models\Bot::class)->create()->id;
|
||||
return Bot::factory()->create()->id;
|
||||
},
|
||||
'to_user' => $faker->boolean,
|
||||
'to_bot' => $faker->boolean,
|
||||
'comment' => $faker->text,
|
||||
'to_user' => $this->faker->boolean,
|
||||
'to_bot' => $this->faker->boolean,
|
||||
'comment' => $this->faker->text,
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,20 +2,38 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\Category::class, function (Faker $faker) {
|
||||
return [
|
||||
'name' => $faker->name,
|
||||
'slug' => $faker->slug,
|
||||
'image' => $faker->word,
|
||||
'position' => $faker->randomNumber(),
|
||||
'icon' => $faker->word,
|
||||
'no_meta' => $faker->boolean,
|
||||
'music_meta' => $faker->boolean,
|
||||
'game_meta' => $faker->boolean,
|
||||
'tv_meta' => $faker->boolean,
|
||||
'movie_meta' => $faker->boolean,
|
||||
'num_torrent' => $faker->randomNumber(),
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class CategoryFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\Category::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->name,
|
||||
'slug' => $this->faker->slug,
|
||||
'image' => $this->faker->word,
|
||||
'position' => $this->faker->randomNumber(),
|
||||
'icon' => $this->faker->word,
|
||||
'no_meta' => $this->faker->boolean,
|
||||
'music_meta' => $this->faker->boolean,
|
||||
'game_meta' => $this->faker->boolean,
|
||||
'tv_meta' => $this->faker->boolean,
|
||||
'movie_meta' => $this->faker->boolean,
|
||||
'num_torrent' => $this->faker->randomNumber(),
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,12 +2,30 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\ChatStatus::class, function (Faker $faker) {
|
||||
return [
|
||||
'name' => $faker->unique()->name,
|
||||
'color' => $faker->unique()->word,
|
||||
'icon' => $faker->word,
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class ChatStatusFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\ChatStatus::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->unique()->name,
|
||||
'color' => $this->faker->unique()->word,
|
||||
'icon' => $this->faker->word,
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,10 +2,28 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\Chatroom::class, function (Faker $faker) {
|
||||
return [
|
||||
'name' => $faker->unique()->word,
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class ChatroomFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\Chatroom::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->unique()->word,
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,26 +2,45 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\Comment::class, function (Faker $faker) {
|
||||
return [
|
||||
'content' => $faker->text,
|
||||
'anon' => (int) $faker->boolean(),
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class CommentFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\Comment::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'content' => $this->faker->text,
|
||||
'anon' => (int) $this->faker->boolean(),
|
||||
'torrent_id' => function () {
|
||||
return factory(App\Models\Torrent::class)->create()->id;
|
||||
return Torrent::factory()->create()->id;
|
||||
},
|
||||
'article_id' => function () {
|
||||
return factory(App\Models\Article::class)->create()->id;
|
||||
return Article::factory()->create()->id;
|
||||
},
|
||||
'requests_id' => function () {
|
||||
return factory(App\Models\TorrentRequest::class)->create()->id;
|
||||
return TorrentRequest::factory()->create()->id;
|
||||
},
|
||||
'playlist_id' => function () {
|
||||
return factory(App\Models\Playlist::class)->create()->id;
|
||||
return Playlist::factory()->create()->id;
|
||||
},
|
||||
'user_id' => function () {
|
||||
return factory(App\Models\User::class)->create()->id;
|
||||
return User::factory()->create()->id;
|
||||
},
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,12 +2,30 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\FailedLoginAttempt::class, function (Faker $faker) {
|
||||
return [
|
||||
'user_id' => $faker->randomNumber(),
|
||||
'username' => $faker->userName,
|
||||
'ip_address' => $faker->word,
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class FailedLoginAttemptFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\FailedLoginAttempt::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'user_id' => $this->faker->randomNumber(),
|
||||
'username' => $this->faker->userName,
|
||||
'ip_address' => $this->faker->word,
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,15 +2,34 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\FeaturedTorrent::class, function (Faker $faker) {
|
||||
return [
|
||||
use App\Models\Torrent;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class FeaturedTorrentFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\FeaturedTorrent::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'user_id' => function () {
|
||||
return factory(App\Models\User::class)->create()->id;
|
||||
return User::factory()->create()->id;
|
||||
},
|
||||
'torrent_id' => function () {
|
||||
return factory(App\Models\Torrent::class)->create()->id;
|
||||
return Torrent::factory()->create()->id;
|
||||
},
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,15 +2,34 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\Follow::class, function (Faker $faker) {
|
||||
return [
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class FollowFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\Follow::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'user_id' => function () {
|
||||
return factory(App\Models\User::class)->create()->id;
|
||||
return User::factory()->create()->id;
|
||||
},
|
||||
'target_id' => function () {
|
||||
return factory(App\Models\User::class)->create()->id;
|
||||
return User::factory()->create()->id;
|
||||
},
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,21 +2,39 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\Forum::class, function (Faker $faker) {
|
||||
return [
|
||||
'position' => $faker->randomNumber(),
|
||||
'num_topic' => $faker->randomNumber(),
|
||||
'num_post' => $faker->randomNumber(),
|
||||
'last_topic_id' => $faker->randomNumber(),
|
||||
'last_topic_name' => $faker->word,
|
||||
'last_topic_slug' => $faker->word,
|
||||
'last_post_user_id' => $faker->randomNumber(),
|
||||
'last_post_user_username' => $faker->word,
|
||||
'name' => $faker->name,
|
||||
'slug' => $faker->slug,
|
||||
'description' => $faker->text,
|
||||
'parent_id' => $faker->randomNumber(),
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class ForumFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\Forum::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'position' => $this->faker->randomNumber(),
|
||||
'num_topic' => $this->faker->randomNumber(),
|
||||
'num_post' => $this->faker->randomNumber(),
|
||||
'last_topic_id' => $this->faker->randomNumber(),
|
||||
'last_topic_name' => $this->faker->word,
|
||||
'last_topic_slug' => $this->faker->word,
|
||||
'last_post_user_id' => $this->faker->randomNumber(),
|
||||
'last_post_user_username' => $this->faker->word,
|
||||
'name' => $this->faker->name,
|
||||
'slug' => $this->faker->slug,
|
||||
'description' => $this->faker->text,
|
||||
'parent_id' => $this->faker->randomNumber(),
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,11 +2,29 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\FreeleechToken::class, function (Faker $faker) {
|
||||
return [
|
||||
'user_id' => $faker->randomNumber(),
|
||||
'torrent_id' => $faker->randomNumber(),
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class FreeleechTokenFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\FreeleechToken::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'user_id' => $this->faker->randomNumber(),
|
||||
'torrent_id' => $this->faker->randomNumber(),
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,11 +2,29 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\GitUpdate::class, function (Faker $faker) {
|
||||
return [
|
||||
'name' => $faker->name,
|
||||
'hash' => $faker->word,
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class GitUpdateFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\GitUpdate::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->name,
|
||||
'hash' => $this->faker->word,
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,17 +2,36 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\Graveyard::class, function (Faker $faker) {
|
||||
return [
|
||||
use App\Models\Torrent;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class GraveyardFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\Graveyard::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'user_id' => function () {
|
||||
return factory(App\Models\User::class)->create()->id;
|
||||
return User::factory()->create()->id;
|
||||
},
|
||||
'torrent_id' => function () {
|
||||
return factory(App\Models\Torrent::class)->create()->id;
|
||||
return Torrent::factory()->create()->id;
|
||||
},
|
||||
'seedtime' => $faker->randomNumber(),
|
||||
'rewarded' => $faker->boolean,
|
||||
'seedtime' => $this->faker->randomNumber(),
|
||||
'rewarded' => $this->faker->boolean,
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,27 +2,45 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\Group::class, function (Faker $faker) {
|
||||
return [
|
||||
'name' => $faker->name,
|
||||
'slug' => $faker->slug,
|
||||
'position' => $faker->randomNumber(),
|
||||
'level' => $faker->randomNumber(),
|
||||
'color' => $faker->word,
|
||||
'icon' => $faker->word,
|
||||
'effect' => $faker->word,
|
||||
'is_internal' => $faker->boolean,
|
||||
'is_owner' => $faker->boolean,
|
||||
'is_admin' => $faker->boolean,
|
||||
'is_modo' => $faker->boolean,
|
||||
'is_trusted' => $faker->boolean,
|
||||
'is_immune' => $faker->boolean,
|
||||
'is_freeleech' => $faker->boolean,
|
||||
'is_double_upload' => $faker->boolean,
|
||||
'can_upload' => $faker->boolean,
|
||||
'is_incognito' => $faker->boolean,
|
||||
'autogroup' => $faker->boolean,
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class GroupFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\Group::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->name,
|
||||
'slug' => $this->faker->slug,
|
||||
'position' => $this->faker->randomNumber(),
|
||||
'level' => $this->faker->randomNumber(),
|
||||
'color' => $this->faker->word,
|
||||
'icon' => $this->faker->word,
|
||||
'effect' => $this->faker->word,
|
||||
'is_internal' => $this->faker->boolean,
|
||||
'is_owner' => $this->faker->boolean,
|
||||
'is_admin' => $this->faker->boolean,
|
||||
'is_modo' => $this->faker->boolean,
|
||||
'is_trusted' => $this->faker->boolean,
|
||||
'is_immune' => $this->faker->boolean,
|
||||
'is_freeleech' => $this->faker->boolean,
|
||||
'is_double_upload' => $this->faker->boolean,
|
||||
'can_upload' => $this->faker->boolean,
|
||||
'is_incognito' => $this->faker->boolean,
|
||||
'autogroup' => $this->faker->boolean,
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,30 +2,49 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\History::class, function (Faker $faker) {
|
||||
return [
|
||||
use App\Models\Torrent;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class HistoryFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\History::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'user_id' => function () {
|
||||
return factory(App\Models\User::class)->create()->id;
|
||||
return User::factory()->create()->id;
|
||||
},
|
||||
'agent' => $faker->word,
|
||||
'agent' => $this->faker->word,
|
||||
'info_hash' => function () {
|
||||
return factory(App\Models\Torrent::class)->create()->id;
|
||||
return Torrent::factory()->create()->id;
|
||||
},
|
||||
'uploaded' => $faker->randomNumber(),
|
||||
'actual_uploaded' => $faker->randomNumber(),
|
||||
'client_uploaded' => $faker->randomNumber(),
|
||||
'downloaded' => $faker->randomNumber(),
|
||||
'actual_downloaded' => $faker->randomNumber(),
|
||||
'client_downloaded' => $faker->randomNumber(),
|
||||
'seeder' => $faker->boolean,
|
||||
'active' => $faker->boolean,
|
||||
'seedtime' => $faker->randomNumber(),
|
||||
'immune' => $faker->boolean,
|
||||
'hitrun' => $faker->boolean,
|
||||
'prewarn' => $faker->boolean,
|
||||
'completed_at' => $faker->dateTime(),
|
||||
'deleted_at' => $faker->dateTime(),
|
||||
'uploaded' => $this->faker->randomNumber(),
|
||||
'actual_uploaded' => $this->faker->randomNumber(),
|
||||
'client_uploaded' => $this->faker->randomNumber(),
|
||||
'downloaded' => $this->faker->randomNumber(),
|
||||
'actual_downloaded' => $this->faker->randomNumber(),
|
||||
'client_downloaded' => $this->faker->randomNumber(),
|
||||
'seeder' => $this->faker->boolean,
|
||||
'active' => $this->faker->boolean,
|
||||
'seedtime' => $this->faker->randomNumber(),
|
||||
'immune' => $this->faker->boolean,
|
||||
'hitrun' => $this->faker->boolean,
|
||||
'prewarn' => $this->faker->boolean,
|
||||
'completed_at' => $this->faker->dateTime(),
|
||||
'deleted_at' => $this->faker->dateTime(),
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,17 +2,36 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\Image::class, function (Faker $faker) {
|
||||
return [
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class ImageFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\Image::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'user_id' => function () {
|
||||
return factory(App\Models\User::class)->create()->id;
|
||||
return User::factory()->create()->id;
|
||||
},
|
||||
'album_id' => $faker->randomNumber(),
|
||||
'image' => $faker->word,
|
||||
'description' => $faker->text,
|
||||
'type' => $faker->word,
|
||||
'downloads' => $faker->randomNumber(),
|
||||
'album_id' => $this->faker->randomNumber(),
|
||||
'image' => $this->faker->word,
|
||||
'description' => $this->faker->text,
|
||||
'type' => $this->faker->word,
|
||||
'downloads' => $this->faker->randomNumber(),
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,20 +2,39 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\Invite::class, function (Faker $faker) {
|
||||
return [
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class InviteFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\Invite::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'user_id' => function () {
|
||||
return factory(App\Models\User::class)->create()->id;
|
||||
return User::factory()->create()->id;
|
||||
},
|
||||
'email' => $faker->safeEmail,
|
||||
'code' => $faker->word,
|
||||
'expires_on' => $faker->dateTime(),
|
||||
'email' => $this->faker->safeEmail,
|
||||
'code' => $this->faker->word,
|
||||
'expires_on' => $this->faker->dateTime(),
|
||||
'accepted_by' => function () {
|
||||
return factory(App\Models\User::class)->create()->id;
|
||||
return User::factory()->create()->id;
|
||||
},
|
||||
'accepted_at' => $faker->dateTime(),
|
||||
'custom' => $faker->text,
|
||||
'accepted_at' => $this->faker->dateTime(),
|
||||
'custom' => $this->faker->text,
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,18 +2,37 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\Like::class, function (Faker $faker) {
|
||||
return [
|
||||
use App\Models\Post;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class LikeFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\Like::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'user_id' => function () {
|
||||
return factory(App\Models\User::class)->create()->id;
|
||||
return User::factory()->create()->id;
|
||||
},
|
||||
'post_id' => function () {
|
||||
return factory(App\Models\Post::class)->create()->id;
|
||||
return Post::factory()->create()->id;
|
||||
},
|
||||
'subtitle_id' => $faker->randomNumber(),
|
||||
'like' => $faker->boolean,
|
||||
'dislike' => $faker->boolean,
|
||||
'subtitle_id' => $this->faker->randomNumber(),
|
||||
'like' => $this->faker->boolean,
|
||||
'dislike' => $this->faker->boolean,
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,22 +2,41 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\Message::class, function (Faker $faker) {
|
||||
return [
|
||||
use App\Models\Bot;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class MessageFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\Message::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'user_id' => function () {
|
||||
return factory(App\Models\User::class)->create()->id;
|
||||
return User::factory()->create()->id;
|
||||
},
|
||||
'chatroom_id' => function () {
|
||||
return factory(App\Models\Chatroom::class)->create()->id;
|
||||
return Chatroom::factory()->create()->id;
|
||||
},
|
||||
'receiver_id' => function () {
|
||||
return factory(App\Models\User::class)->create()->id;
|
||||
return User::factory()->create()->id;
|
||||
},
|
||||
'bot_id' => function () {
|
||||
return factory(App\Models\Bot::class)->create()->id;
|
||||
return Bot::factory()->create()->id;
|
||||
},
|
||||
'message' => $faker->text,
|
||||
'message' => $this->faker->text,
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,16 +2,35 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\Note::class, function (Faker $faker) {
|
||||
return [
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class NoteFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\Note::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'user_id' => function () {
|
||||
return factory(App\Models\User::class)->create()->id;
|
||||
return User::factory()->create()->id;
|
||||
},
|
||||
'staff_id' => function () {
|
||||
return factory(App\Models\User::class)->create()->id;
|
||||
return User::factory()->create()->id;
|
||||
},
|
||||
'message' => $faker->text,
|
||||
'message' => $this->faker->text,
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,14 +2,32 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\Notification::class, function (Faker $faker) {
|
||||
return [
|
||||
'type' => $faker->word,
|
||||
'notifiable_id' => $faker->randomNumber(),
|
||||
'notifiable_type' => $faker->word,
|
||||
'data' => $faker->text,
|
||||
'read_at' => $faker->dateTime(),
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class NotificationFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\Notification::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'type' => $this->faker->word,
|
||||
'notifiable_id' => $this->faker->randomNumber(),
|
||||
'notifiable_type' => $this->faker->word,
|
||||
'data' => $this->faker->text,
|
||||
'read_at' => $this->faker->dateTime(),
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,14 +2,33 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\Option::class, function (Faker $faker) {
|
||||
return [
|
||||
use App\Models\Poll;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class OptionFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\Option::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'poll_id' => function () {
|
||||
return factory(App\Models\Poll::class)->create()->id;
|
||||
return Poll::factory()->create()->id;
|
||||
},
|
||||
'name' => $faker->name,
|
||||
'votes' => $faker->randomNumber(),
|
||||
'name' => $this->faker->name,
|
||||
'votes' => $this->faker->randomNumber(),
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,12 +2,30 @@
|
||||
|
||||
/* @var $factory \Illuminate\Database\Eloquent\Factory */
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
namespace Database\Factories;
|
||||
|
||||
$factory->define(App\Models\Page::class, function (Faker $faker) {
|
||||
return [
|
||||
'name' => $faker->name,
|
||||
'slug' => $faker->slug,
|
||||
'content' => $faker->text,
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
class PageFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The name of the factory's corresponding model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = \App\Models\Page::class;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function definition()
|
||||
{
|
||||
return [
|
||||
'name' => $this->faker->name,
|
||||
'slug' => $this->faker->slug,
|
||||
'content' => $this->faker->text,
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user