ClientStickyNote.php 467 B

123456789101112131415161718192021
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Relations\HasMany;
  4. use Illuminate\Database\Eloquent\Relations\HasOne;
  5. class ClientStickyNote extends Model
  6. {
  7. protected $table = 'client_sticky_note';
  8. public function createdBy(): HasOne
  9. {
  10. return $this->hasOne(AppSession::class, 'id', 'created_by_session_id');
  11. }
  12. public function client(): HasOne
  13. {
  14. return $this->hasOne(Client::class, 'id', 'client_id');
  15. }
  16. }