feat: Team APIs (#1654)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Sojan Jose
2021-01-17 23:56:56 +05:30
committed by GitHub
parent dd90e24d02
commit a0c33254e7
29 changed files with 523 additions and 2 deletions

View File

@@ -0,0 +1,20 @@
class CreateTeams < ActiveRecord::Migration[6.0]
def change
create_table :teams do |t|
t.string :name, null: false
t.text :description
t.boolean :allow_auto_assign, default: true
t.references :account, null: false, foreign_key: true
t.timestamps
end
create_table :team_members do |t|
t.references :team, null: false, foreign_key: true
t.references :user, null: false, foreign_key: true
t.timestamps
end
add_reference :conversations, :team, foreign_key: true
end
end