* feat: add models * chore: refactor sla column names * chore: remove foreign keys * chore: fix spec * chore: refactor models
26 lines
805 B
Ruby
26 lines
805 B
Ruby
# == Schema Information
|
|
#
|
|
# Table name: sla_policies
|
|
#
|
|
# id :bigint not null, primary key
|
|
# description :string
|
|
# first_response_time_threshold :float
|
|
# name :string not null
|
|
# next_response_time_threshold :float
|
|
# only_during_business_hours :boolean default(FALSE)
|
|
# resolution_time_threshold :float
|
|
# created_at :datetime not null
|
|
# updated_at :datetime not null
|
|
# account_id :bigint not null
|
|
#
|
|
# Indexes
|
|
#
|
|
# index_sla_policies_on_account_id (account_id)
|
|
#
|
|
class SlaPolicy < ApplicationRecord
|
|
belongs_to :account
|
|
validates :name, presence: true
|
|
|
|
has_many :conversations, dependent: :nullify
|
|
end
|