2020-08-06 16:35:45 +02:00
|
|
|
# == Schema Information
|
|
|
|
#
|
|
|
|
# Table name: feedbacks
|
|
|
|
#
|
|
|
|
# id :bigint not null, primary key
|
|
|
|
# rating :string not null
|
|
|
|
# created_at :datetime not null
|
|
|
|
# updated_at :datetime not null
|
|
|
|
# user_id :bigint
|
|
|
|
#
|
2018-08-08 17:37:41 +02:00
|
|
|
class Feedback < ApplicationRecord
|
2020-07-20 16:44:40 +02:00
|
|
|
belongs_to :user, optional: false
|
2018-08-27 12:59:22 +02:00
|
|
|
|
|
|
|
enum rating: {
|
|
|
|
happy: 'happy',
|
|
|
|
neutral: 'neutral',
|
|
|
|
unhappy: 'unhappy'
|
|
|
|
}
|
2018-08-27 17:14:58 +02:00
|
|
|
|
|
|
|
validates :rating, presence: true
|
2018-08-08 17:37:41 +02:00
|
|
|
end
|