| namespace App\Models; | |
| // use Illuminate\Contracts\Auth\MustVerifyEmail; | |
| use Illuminate\Database\Eloquent\Factories\HasFactory; | |
| use Illuminate\Foundation\Auth\User as Authenticatable; | |
| use Illuminate\Notifications\Notifiable; | |
| use Illuminate\Database\Eloquent\Relations\HasMany; | |
| use Illuminate\Database\Eloquent\Relations\HasOne; | |
| use Laravel\Sanctum\HasApiTokens; | |
| class User extends Authenticatable | |
| { | |
| use HasApiTokens, HasFactory, Notifiable; | |
| /** | |
| * The attributes that are mass assignable. | |
| * | |
| * @var array<int, string> | |
| */ | |
| protected $fillable = [ | |
| 'name', | |
| 'email', | |
| 'google_id', | |
| 'email_verified_at', | |
| 'password', | |
| ]; | |
| /** | |
| * The attributes that should be hidden for serialization. | |
| * | |
| * @var array<int, string> | |
| */ | |
| protected $hidden = [ | |
| 'password', | |
| 'remember_token', | |
| ]; | |
| /** | |
| * The attributes that should be cast. | |
| * | |
| * @var array<string, string> | |
| */ | |
| protected $casts = [ | |
| 'email_verified_at' => 'datetime', | |
| 'password' => 'hashed', | |
| ]; | |
| public function chatConversations(): HasMany | |
| { | |
| return $this->hasMany(ChatConversation::class); | |
| } | |
| public function socialPosts(): HasMany | |
| { | |
| return $this->hasMany(SocialPost::class); | |
| } | |
| public function socialPlatformCredentials(): HasMany | |
| { | |
| return $this->hasMany(SocialPlatformCredential::class); | |
| } | |
| public function socialAutomationSetting(): HasOne | |
| { | |
| return $this->hasOne(SocialAutomationSetting::class); | |
| } | |
| public function socialMediaAssets(): HasMany | |
| { | |
| return $this->hasMany(SocialMediaAsset::class); | |
| } | |
| public function socialRecurringCampaigns(): HasMany | |
| { | |
| return $this->hasMany(SocialRecurringCampaign::class); | |
| } | |
| public function socialRecurringAlerts(): HasMany | |
| { | |
| return $this->hasMany(SocialRecurringAlert::class); | |
| } | |
| } | |