olympiamanagement/app/models/school_data_fields.rb

22 lines
1.8 KiB
Ruby

class SchoolDataFields
include Mongoid::Document
include Mongoid::Timestamps
include OrbitModel::Status
include OrbitModel::Impression
# encoding: utf-8
include OrbitTag::Taggable
include OrbitCategory::Categorizable
field :school_data_fields , type: Array , default: [{'account_number'=>{'type'=>'String','size'=>'20','hint'=>{'zh_tw'=>'','en'=>''},'required'=>"true"}},
{'password'=>{'type'=>'String','size'=>'','hint'=>{'zh_tw'=>'未修改即依照預設密碼','en'=>'Use default password without modification'}}},
{'school_name'=>{'type'=>'String','size'=>'20','hint'=>{'zh_tw'=>'','en'=>''},'required'=>"true"}},
{'school_code'=>{'type'=>'String','size'=>'20','hint'=>{'zh_tw'=>'','en'=>''},'required'=>"true"}},
{'school_address'=>{'type'=>'String','size'=>'40','hint'=>{'zh_tw'=>'','en'=>''},'required'=>"true"}},
{'class_number'=>{'type'=>'select','size'=>'','hint'=>{'zh_tw'=>'','en'=>''},'range'=>[1,200],'unit'=>{'zh_tw'=>'班','en'=>'class'},'required'=>"true"}},
{'enrollment_limited'=>{'type'=>'Fixnum','size'=>'5','hint'=>{'zh_tw'=>'未修改即依照班級設定','en'=>'Use class settings without modification'}}},
{'school_contact_person_name'=>{'type'=>'String','size'=>'20','hint'=>{'zh_tw'=>'','en'=>''}}},
{'department_job_title'=>{'type'=>'String','size'=>'20','hint'=>{'zh_tw'=>'','en'=>''}}},
{'office_tel_number'=>{'type'=>'String','size'=>'20','hint'=>{'zh_tw'=>'','en'=>''}}},
{'fax'=>{'type'=>'String','size'=>'20','hint'=>{'zh_tw'=>'','en'=>''}}},
{'mobile_number'=>{'type'=>'String','size'=>'20','hint'=>{'zh_tw'=>'','en'=>''}}},
{'email'=>{'type'=>'String','size'=>'40','hint'=>{'zh_tw'=>'','en'=>''}}}]
end