Class: Phoenix::Base
Class Method Summary collapse
-
.inherited(base) ⇒ Object
类变量meta_data 记录表的字段类型 [:column_type=>“UNSIGNED_INT”, :column_type=>“VARCHAR”, :column_type=>“UNSIGNED_LONG”].
Methods included from Common
#error, #human_create_date, #human_status, #initialize
Class Method Details
.inherited(base) ⇒ Object
类变量meta_data 记录表的字段类型 [:column_type=>“UNSIGNED_INT”,
{:column_name=>"ACCOUNT_ID", :column_type=>"VARCHAR"},
{:column_name=>"CREATE_DATE", :column_type=>"UNSIGNED_LONG"}]
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/phoenix/base.rb', line 10 def self.inherited(base) table_name = base.table_name = Phoenix::Rjb.(table_name) if .blank? raise "the phoenix table #{table_name} is Not Found!!!" end base.class_variable_set("@@meta_data", ) .each do |row| base.send(:attr_accessor, row[:column_name]) end end |