# Team Model

DB Table Name {wp_db_prefix}_fbs_teams
Schema Check Schema
Source File fluent-boards/app/Models/Team.php
Name Space FluentBoards\App\Models
Class FluentBoards\App\Models\Team

# Attributes

Attribute Data Type Comment
id INT UNSIGNED Auto Increment Primary key of the record
parent_id INT UNSIGNED NULL ID of the parent team if this is a sub-team
title VARCHAR(100) Name of the team
description TEXT NULL Description of the team
type VARCHAR(50) Type of the team (e.g., project, department)
visibility VARCHAR(50) DEFAULT 'VISIBLE' Visibility of the team (VISIBLE/SECRET)
notifications_enabled TINYINT(1) DEFAULT 1 Whether notifications are enabled for the team
settings TEXT NULL Serialized settings for the team
created_by BIGINT UNSIGNED ID of the user who created the team
created_at TIMESTAMP NULL Timestamp when the team was created
updated_at TIMESTAMP NULL Timestamp when the team was last updated

# Usage

Please check Model Basic for Common methods.

# Accessing Attributes

$team = FluentBoards\App\Models\Team::find(1);

$team->id; // returns id
$team->name; // returns name
$team->settings; // returns settings (unserialized)
.......
1
2
3
4
5
6

# Relations

This model has the following relationships that you can use

# parent

Access the parent team, if any

  • return FluentTeams\App\Models\Team Model Collection

# Example:

$parentTeam = $team->parent;
1