feat: Team APIs (#1654)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
25
app/models/team.rb
Normal file
25
app/models/team.rb
Normal file
@@ -0,0 +1,25 @@
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: teams
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# allow_auto_assign :boolean default(TRUE)
|
||||
# description :text
|
||||
# name :string not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# account_id :bigint not null
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_teams_on_account_id (account_id)
|
||||
#
|
||||
# Foreign Keys
|
||||
#
|
||||
# fk_rails_... (account_id => accounts.id)
|
||||
#
|
||||
class Team < ApplicationRecord
|
||||
belongs_to :account
|
||||
has_many :team_members, dependent: :destroy
|
||||
has_many :conversations, dependent: :nullify
|
||||
end
|
||||
Reference in New Issue
Block a user