Class: TransactionNotif
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- TransactionNotif
- Defined in:
- app/models/transaction_notif.rb
Overview
typed: ignore
Schema Information
Table name: transaction_notifs
id :bigint not null, primary key
message_en :text(65535)
message_th :text(65535)
model_type :string(191)
notif_type :integer default("booking"), not null
title :string(191)
created_at :datetime not null
updated_at :datetime not null
model_id :bigint
reservation_id :integer
restaurant_id :integer
Indexes
index_transaction_notifs_on_model_type_and_model_id (model_type,model_id)
index_transaction_notifs_on_reservation_id (reservation_id)
index_transaction_notifs_on_restaurant_id (restaurant_id)
Foreign Keys
fk_rails_... (reservation_id => reservations.id)
fk_rails_... (restaurant_id => restaurants.id)
Instance Method Summary collapse
Methods inherited from ApplicationRecord
Instance Method Details
#message ⇒ Object
55 56 57 58 59 60 61 62 |
# File 'app/models/transaction_notif.rb', line 55 def method = "message_#{I18n.locale}".to_sym if respond_to?(method) send(method) else end end |