From 2f991f63d6b42e7edd33a69d0f29b886b642c2b6 Mon Sep 17 00:00:00 2001 From: Guilherme Capanema Date: Sat, 6 Jun 2020 17:20:37 -0300 Subject: [PATCH] Renomeia modelos --- app/{User.php => Associate.php} | 6 +-- ...UserCategory.php => AssociateCategory.php} | 2 +- app/{UserNature.php => AssociateNature.php} | 2 +- app/{UserType.php => AssociateType.php} | 2 +- app/Collaborator.php | 54 +++++++++++++++++++ 5 files changed, 60 insertions(+), 6 deletions(-) rename app/{User.php => Associate.php} (87%) rename app/{UserCategory.php => AssociateCategory.php} (93%) rename app/{UserNature.php => AssociateNature.php} (92%) rename app/{UserType.php => AssociateType.php} (93%) create mode 100644 app/Collaborator.php diff --git a/app/User.php b/app/Associate.php similarity index 87% rename from app/User.php rename to app/Associate.php index 2c70129..f918860 100644 --- a/app/User.php +++ b/app/Associate.php @@ -6,7 +6,7 @@ use App\Events\UserCreating; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; -class User extends Authenticatable +class Associate extends Authenticatable { use Notifiable; @@ -15,7 +15,7 @@ class User extends Authenticatable * * @var array */ - protected $guarded = ['user_category_id', 'user_nature_id', 'user_type_id', 'remember_token']; + protected $guarded = ['associate_category_id', 'associate_nature_id', 'associate_type_id', 'remember_token']; /** * The attributes that should be hidden for arrays. @@ -56,7 +56,7 @@ class User extends Authenticatable // /** - * Get the user's category + * Get the associate's category */ public function category() { diff --git a/app/UserCategory.php b/app/AssociateCategory.php similarity index 93% rename from app/UserCategory.php rename to app/AssociateCategory.php index 8851253..17cac60 100644 --- a/app/UserCategory.php +++ b/app/AssociateCategory.php @@ -5,7 +5,7 @@ namespace App; use Illuminate\Database\Eloquent\Model; use Sushi\Sushi; -class UserCategory extends Model +class AssociateCategory extends Model { use Sushi; diff --git a/app/UserNature.php b/app/AssociateNature.php similarity index 92% rename from app/UserNature.php rename to app/AssociateNature.php index 67b48df..172aef2 100644 --- a/app/UserNature.php +++ b/app/AssociateNature.php @@ -5,7 +5,7 @@ namespace App; use Illuminate\Database\Eloquent\Model; use Sushi\Sushi; -class UserNature extends Model +class AssociateNature extends Model { use Sushi; diff --git a/app/UserType.php b/app/AssociateType.php similarity index 93% rename from app/UserType.php rename to app/AssociateType.php index 9d0b820..b70b67e 100644 --- a/app/UserType.php +++ b/app/AssociateType.php @@ -5,7 +5,7 @@ namespace App; use Illuminate\Database\Eloquent\Model; use Sushi\Sushi; -class UserType extends Model +class AssociateType extends Model { use Sushi; diff --git a/app/Collaborator.php b/app/Collaborator.php new file mode 100644 index 0000000..f802e31 --- /dev/null +++ b/app/Collaborator.php @@ -0,0 +1,54 @@ + UserCreating::class, + ]; + + // + // + // ===================================================================== + // RELATIONSHIPS + // ===================================================================== + // + // + + + // + // + // ===================================================================== + // OTHER METHODS + // ===================================================================== + // + // +}