# == Schema Information
#
# Table name: action_node_types
#
#  id          :integer          not null, primary key
#  name        :string(255)
#  description :string(255)
#  sort_no     :integer          default("0")
#  created_at  :datetime         not null
#  updated_at  :datetime         not null
#

class Action::NodeType < ApplicationRecord
  self.table_name = 'action_node_types'
  default_scope { order(sort_no: :asc) }

  has_many :action_nodes, :class_name => 'Action::Node', foreign_key: "action_node_types_id"

  validates :name, presence: { message: "不能为空" }
  validates :description, length: { maximum: 65535, too_long: "不能超过65535个字符"}
end
