forgeplus/app/models/user_agent.rb

28 lines
804 B
Ruby
Raw Normal View History

2020-11-23 15:35:03 +08:00
# == Schema Information
#
# Table name: user_agents
#
# id :integer not null, primary key
# agent_type :string(255)
# key :string(255)
# ip :string(255)
# created_at :datetime not null
# updated_at :datetime not null
# register_status :integer default("0")
# action_status :integer default("0")
# is_delete :boolean default("0")
# user_id :integer
2020-11-23 15:35:03 +08:00
#
# Indexes
#
# index_user_agents_on_ip (ip)
# index_user_agents_on_user_id (user_id)
2020-11-23 15:35:03 +08:00
#
2020-03-09 00:40:16 +08:00
class UserAgent < ApplicationRecord
2020-04-23 11:08:29 +08:00
has_many :user_actions, :foreign_key => "ip", :primary_key => "ip"
2020-03-09 00:40:16 +08:00
USER_AD = 1 # 广告宣传的引流
USER_REGISTER = 2 # 引流注册
USER_COMPETITION = 3 # 引流参加竞赛
end