# Company Note Model | DB Table Name | {wp_db_prefix}_fc_subscriber_notes | |---------------|-------------------------------------------------------------------------------| | Schema | Check Schema | | Source File | fluent-crm/app/Models/CompanyNote.php | | Name Space | FluentCrm\App\Models | | Class | FluentCrm\App\Models\CompanyNote | ## Global Scope This model has a global scope that filters by `status = '_company_note_'`. The status is auto-set on create. ::: tip Shared Table This model shares the `fc_subscriber_notes` table with `SubscriberNote` and `SystemLog`. The `subscriber_id` column stores the **company ID** (not a subscriber ID) in this context. ::: ## Attributes
Attribute Data Type Comment
id Integer
subscriber_id Integer Stores the company ID
parent_id Integer
created_by Integer Auto-set to current user on create
status String Always '_company_note_'
type String
title String
description Text
created_at Date Time Auto-set on create
updated_at Date Time Auto-set on create and update
## Fillable Attributes ```php 'subscriber_id', // company ID 'parent_id', 'created_by', 'type', 'title', 'description', 'created_at' ``` ## Relations ### company Access the associated company - return `FluentCrm\App\Models\Company` Model (BelongsTo via `subscriber_id`) #### Example: ```php $company = $note->company; ``` ## Methods ### markAs($status) Update the note status - Parameters - $status `string` - Returns `FluentCrm\App\Models\CompanyNote` #### Usage ```php $note->markAs('open'); ``` ### createdBy() Get note creator personal information - Parameters - none - Returns `array` — `['ID', 'first_name', 'last_name', 'display_name']` #### Usage ```php $creatorInfo = $note->createdBy(); ```