mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-03 12:37:56 +00:00
- adds an audit log when an agent is added or removed from a team - adds an audit log when an agent is added or removed from an inbox Co-authored-by: Sojan Jose <sojan@pepalo.com>
24 lines
655 B
Ruby
24 lines
655 B
Ruby
# == Schema Information
|
|
#
|
|
# Table name: team_members
|
|
#
|
|
# id :bigint not null, primary key
|
|
# created_at :datetime not null
|
|
# updated_at :datetime not null
|
|
# team_id :bigint not null
|
|
# user_id :bigint not null
|
|
#
|
|
# Indexes
|
|
#
|
|
# index_team_members_on_team_id (team_id)
|
|
# index_team_members_on_team_id_and_user_id (team_id,user_id) UNIQUE
|
|
# index_team_members_on_user_id (user_id)
|
|
#
|
|
class TeamMember < ApplicationRecord
|
|
belongs_to :user
|
|
belongs_to :team
|
|
validates :user_id, uniqueness: { scope: :team_id }
|
|
end
|
|
|
|
TeamMember.include_mod_with('Audit::TeamMember')
|