2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-02-02 04:41:57 -05:00
|
|
|
class CustomEmoji < ActiveRecord::Base
|
|
|
|
belongs_to :upload
|
|
|
|
|
|
|
|
validates :name, presence: true, uniqueness: true
|
|
|
|
validates :upload_id, presence: true
|
|
|
|
end
|
2017-03-22 02:26:53 -04:00
|
|
|
|
|
|
|
# == Schema Information
|
|
|
|
#
|
|
|
|
# Table name: custom_emojis
|
|
|
|
#
|
|
|
|
# id :integer not null, primary key
|
|
|
|
# name :string not null
|
|
|
|
# upload_id :integer not null
|
|
|
|
# created_at :datetime not null
|
|
|
|
# updated_at :datetime not null
|
2020-04-28 06:29:39 -04:00
|
|
|
# group :string(20)
|
2017-03-22 02:26:53 -04:00
|
|
|
#
|
|
|
|
# Indexes
|
|
|
|
#
|
|
|
|
# index_custom_emojis_on_name (name) UNIQUE
|
|
|
|
#
|