31 lines
975 B
Ruby
31 lines
975 B
Ruby
# == Schema Information
|
|
#
|
|
# Table name: action_node_inputs
|
|
#
|
|
# id :integer not null, primary key
|
|
# action_nodes_id :integer
|
|
# name :string(255)
|
|
# input_type :string(255)
|
|
# description :string(255)
|
|
# is_required :boolean default("0")
|
|
# sort_no :integer default("0")
|
|
# user_id :integer
|
|
# created_at :datetime not null
|
|
# updated_at :datetime not null
|
|
#
|
|
# Indexes
|
|
#
|
|
# index_action_node_inputs_on_action_nodes_id (action_nodes_id)
|
|
# index_action_node_inputs_on_user_id (user_id)
|
|
#
|
|
|
|
class Action::NodeInput < ApplicationRecord
|
|
self.table_name = 'action_node_inputs'
|
|
default_scope { order(sort_no: :asc) }
|
|
|
|
belongs_to :action_node, :class_name => 'Action::Node', foreign_key: "action_nodes_id"
|
|
|
|
validates :name, presence: { message: "不能为空" }
|
|
validates :description, length: { maximum: 65535, too_long: "不能超过65535个字符"}
|
|
end
|