enju_standalone_interface 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +3 -0
  3. data/Rakefile +35 -0
  4. data/app/assets/javascripts/enju_standalone_interface/application.js +15 -0
  5. data/app/assets/javascripts/enju_standalone_interface/batch_action.js +2 -0
  6. data/app/assets/stylesheets/enju_standalone_interface/application.css +13 -0
  7. data/app/assets/stylesheets/enju_standalone_interface/batch_action.css +4 -0
  8. data/app/controllers/application_controller.rb +4 -0
  9. data/app/controllers/batch_action_controller.rb +9 -0
  10. data/app/helpers/enju_standalone_interface/application_helper.rb +4 -0
  11. data/app/helpers/enju_standalone_interface/batch_action_helper.rb +4 -0
  12. data/app/views/enju_standalone_interface/batch_action/recept.html.erb +1 -0
  13. data/app/views/layouts/enju_standalone_interface/application.html.erb +14 -0
  14. data/config/routes.rb +3 -0
  15. data/lib/enju_standalone_interface.rb +233 -0
  16. data/lib/enju_standalone_interface/engine.rb +5 -0
  17. data/lib/enju_standalone_interface/version.rb +3 -0
  18. data/lib/tasks/enju_standalone_interface_tasks.rake +4 -0
  19. data/spec/controllers/enju_standalone_interface/batch_action_controller_spec.rb +21 -0
  20. data/spec/dummy/README.rdoc +261 -0
  21. data/spec/dummy/Rakefile +7 -0
  22. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  23. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  24. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  25. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  26. data/spec/dummy/app/helpers/users_helper.rb +36 -0
  27. data/spec/dummy/app/models/basket.rb +70 -0
  28. data/spec/dummy/app/models/carrier_type.rb +33 -0
  29. data/spec/dummy/app/models/checked_item.rb +177 -0
  30. data/spec/dummy/app/models/checkout.rb +307 -0
  31. data/spec/dummy/app/models/checkout_type.rb +33 -0
  32. data/spec/dummy/app/models/circulation_status.rb +23 -0
  33. data/spec/dummy/app/models/event.rb +124 -0
  34. data/spec/dummy/app/models/item.rb +1234 -0
  35. data/spec/dummy/app/models/item_has_use_restriction.rb +23 -0
  36. data/spec/dummy/app/models/lending_policy.rb +32 -0
  37. data/spec/dummy/app/models/library.rb +105 -0
  38. data/spec/dummy/app/models/library_group.rb +88 -0
  39. data/spec/dummy/app/models/manifestation.rb +698 -0
  40. data/spec/dummy/app/models/patron.rb +342 -0
  41. data/spec/dummy/app/models/role.rb +47 -0
  42. data/spec/dummy/app/models/shelf.rb +83 -0
  43. data/spec/dummy/app/models/use_restriction.rb +22 -0
  44. data/spec/dummy/app/models/user.rb +580 -0
  45. data/spec/dummy/app/models/user_group.rb +43 -0
  46. data/spec/dummy/app/models/user_group_has_checkout_type.rb +80 -0
  47. data/spec/dummy/app/models/user_has_role.rb +4 -0
  48. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  49. data/spec/dummy/config.ru +4 -0
  50. data/spec/dummy/config/application.rb +57 -0
  51. data/spec/dummy/config/boot.rb +10 -0
  52. data/spec/dummy/config/database.yml +25 -0
  53. data/spec/dummy/config/environment.rb +5 -0
  54. data/spec/dummy/config/environments/development.rb +37 -0
  55. data/spec/dummy/config/environments/production.rb +67 -0
  56. data/spec/dummy/config/environments/test.rb +37 -0
  57. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  58. data/spec/dummy/config/initializers/inflections.rb +15 -0
  59. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  60. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  61. data/spec/dummy/config/initializers/session_store.rb +8 -0
  62. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  63. data/spec/dummy/config/locales/en.yml +5 -0
  64. data/spec/dummy/config/locales/translation_en.yml +1724 -0
  65. data/spec/dummy/config/locales/validates_timeliness.en.yml +16 -0
  66. data/spec/dummy/config/routes.rb +4 -0
  67. data/spec/dummy/db/development.sqlite3 +0 -0
  68. data/spec/dummy/db/migrate/20120322223037_create_users.rb +71 -0
  69. data/spec/dummy/db/migrate/20120323053037_create_roles.rb +15 -0
  70. data/spec/dummy/db/migrate/20120323060718_create_user_has_roles.rb +10 -0
  71. data/spec/dummy/db/migrate/20120323062239_create_libraries.rb +37 -0
  72. data/spec/dummy/db/migrate/20120323063602_create_items.rb +33 -0
  73. data/spec/dummy/db/migrate/20120323064619_craete_circulation_statuses.rb +13 -0
  74. data/spec/dummy/db/migrate/20120323065157_craete_checkout_types.rb +13 -0
  75. data/spec/dummy/db/migrate/20120323070102_craete_shelves.rb +17 -0
  76. data/spec/dummy/db/migrate/20120323071616_craete_library_groups.rb +24 -0
  77. data/spec/dummy/db/migrate/20120323073022_craete_patrons.rb +72 -0
  78. data/spec/dummy/db/migrate/20120323141030_create_manifestations.rb +97 -0
  79. data/spec/dummy/db/migrate/20120323142330_create_carrier_types.rb +12 -0
  80. data/spec/dummy/db/migrate/20120324132708_create_baskets.rb +20 -0
  81. data/spec/dummy/db/migrate/20120324135409_checked_items.rb +16 -0
  82. data/spec/dummy/db/migrate/20120324141007_create_user_groups.rb +22 -0
  83. data/spec/dummy/db/migrate/20120324141950_create_user_group_has_checkout_type.rb +26 -0
  84. data/spec/dummy/db/migrate/20120324151951_create_lending_policies.rb +22 -0
  85. data/spec/dummy/db/migrate/20120324153756_create_use_restrictions.rb +15 -0
  86. data/spec/dummy/db/migrate/20120324154009_create_item_has_use_restrictions.rb +16 -0
  87. data/spec/dummy/db/migrate/20120324164815_create_checkouts.rb +26 -0
  88. data/spec/dummy/db/migrate/20120325160112_create_events.rb +23 -0
  89. data/spec/dummy/db/schema.rb +518 -0
  90. data/spec/dummy/db/test.sqlite3 +0 -0
  91. data/spec/dummy/lib/enju_leaf.rb +6 -0
  92. data/spec/dummy/lib/enju_leaf/master_model.rb +41 -0
  93. data/spec/dummy/lib/enju_leaf/url_validator.rb +10 -0
  94. data/spec/dummy/log/development.log +116 -0
  95. data/spec/dummy/log/test.log +17849 -0
  96. data/spec/dummy/public/404.html +26 -0
  97. data/spec/dummy/public/422.html +26 -0
  98. data/spec/dummy/public/500.html +25 -0
  99. data/spec/dummy/public/favicon.ico +0 -0
  100. data/spec/dummy/script/rails +6 -0
  101. data/spec/factories/item.rb +9 -0
  102. data/spec/factories/manifestation.rb +6 -0
  103. data/spec/factories/user.rb +27 -0
  104. data/spec/fixtures/carrier_types.yml +38 -0
  105. data/spec/fixtures/checkout_types.yml +34 -0
  106. data/spec/fixtures/circulation_statuses.yml +135 -0
  107. data/spec/fixtures/libraries.yml +40 -0
  108. data/spec/fixtures/roles.yml +21 -0
  109. data/spec/fixtures/shelves.yml +53 -0
  110. data/spec/fixtures/user_group_has_checkout_types.yml +14 -0
  111. data/spec/fixtures/user_groups.yml +7 -0
  112. data/spec/libs/enju_standalone_interface_spec.rb +133 -0
  113. data/spec/spec_helper.rb +36 -0
  114. metadata +358 -0
@@ -0,0 +1,20 @@
1
+ class CreateBaskets < ActiveRecord::Migration
2
+ def up
3
+ create_table "baskets" do |t|
4
+ t.integer "user_id"
5
+ t.text "note"
6
+ t.string "type"
7
+ t.integer "lock_version", :default => 0, :null => false
8
+ t.datetime "created_at", :null => false
9
+ t.datetime "updated_at", :null => false
10
+ t.datetime "deleted_at"
11
+ end
12
+
13
+ add_index "baskets", ["type"], :name => "index_baskets_on_type"
14
+ add_index "baskets", ["user_id"], :name => "index_baskets_on_user_id"
15
+ end
16
+
17
+ def down
18
+ end
19
+
20
+ end
@@ -0,0 +1,16 @@
1
+ class CheckedItems < ActiveRecord::Migration
2
+ def change
3
+ create_table "checked_items" do |t|
4
+ t.integer "item_id", :null => false
5
+ t.integer "basket_id", :null => false
6
+ t.datetime "due_date", :null => false
7
+ t.datetime "created_at", :null => false
8
+ t.datetime "updated_at", :null => false
9
+ t.datetime "deleted_at"
10
+ end
11
+
12
+ add_index "checked_items", ["basket_id"], :name => "index_checked_items_on_basket_id"
13
+ add_index "checked_items", ["item_id"], :name => "index_checked_items_on_item_id"
14
+ end
15
+
16
+ end
@@ -0,0 +1,22 @@
1
+ class CreateUserGroups < ActiveRecord::Migration
2
+ def up
3
+ create_table "user_groups", :force => true do |t|
4
+ t.string "name"
5
+ t.string "string"
6
+ t.text "display_name"
7
+ t.text "note"
8
+ t.integer "position"
9
+ t.datetime "created_at", :null => false
10
+ t.datetime "updated_at", :null => false
11
+ t.datetime "deleted_at"
12
+ t.integer "valid_period_for_new_user", :default => 0, :null => false
13
+ t.datetime "expired_at"
14
+ t.integer "number_of_day_to_notify_overdue", :default => 1, :null => false
15
+ t.integer "number_of_day_to_notify_due_date", :default => 7, :null => false
16
+ t.integer "number_of_time_to_notify_overdue", :default => 3, :null => false
17
+ end
18
+ end
19
+
20
+ def down
21
+ end
22
+ end
@@ -0,0 +1,26 @@
1
+ class CreateUserGroupHasCheckoutType < ActiveRecord::Migration
2
+ def up
3
+ create_table "user_group_has_checkout_types" do |t|
4
+ t.integer "user_group_id", :null => false
5
+ t.integer "checkout_type_id", :null => false
6
+ t.integer "checkout_limit", :default => 0, :null => false
7
+ t.integer "checkout_period", :default => 0, :null => false
8
+ t.integer "checkout_renewal_limit", :default => 0, :null => false
9
+ t.integer "reservation_limit", :default => 0, :null => false
10
+ t.integer "reservation_expired_period", :default => 7, :null => false
11
+ t.boolean "set_due_date_before_closing_day", :default => false, :null => false
12
+ t.datetime "fixed_due_date"
13
+ t.text "note"
14
+ t.integer "position"
15
+ t.datetime "created_at", :null => false
16
+ t.datetime "updated_at", :null => false
17
+ t.integer "current_checkout_count"
18
+ end
19
+
20
+ add_index "user_group_has_checkout_types", ["checkout_type_id"], :name => "index_user_group_has_checkout_types_on_checkout_type_id"
21
+ add_index "user_group_has_checkout_types", ["user_group_id"], :name => "index_user_group_has_checkout_types_on_user_group_id"
22
+ end
23
+
24
+ def down
25
+ end
26
+ end
@@ -0,0 +1,22 @@
1
+ class CreateLendingPolicies < ActiveRecord::Migration
2
+ def up
3
+ create_table "lending_policies", :force => true do |t|
4
+ t.integer "item_id", :null => false
5
+ t.integer "user_group_id", :null => false
6
+ t.integer "loan_period", :default => 0, :null => false
7
+ t.datetime "fixed_due_date"
8
+ t.integer "renewal", :default => 0, :null => false
9
+ t.decimal "fine", :default => 0.0, :null => false
10
+ t.text "note"
11
+ t.integer "position"
12
+ t.datetime "created_at", :null => false
13
+ t.datetime "updated_at", :null => false
14
+ end
15
+
16
+ add_index "lending_policies", ["item_id"], :name => "index_lending_policies_on_item_id"
17
+ add_index "lending_policies", ["user_group_id"], :name => "index_lending_policies_on_user_group_id"
18
+ end
19
+
20
+ def down
21
+ end
22
+ end
@@ -0,0 +1,15 @@
1
+ class CreateUseRestrictions < ActiveRecord::Migration
2
+ def up
3
+ create_table "use_restrictions" do |t|
4
+ t.string "name", :null => false
5
+ t.text "display_name"
6
+ t.text "note"
7
+ t.integer "position"
8
+ t.datetime "created_at", :null => false
9
+ t.datetime "updated_at", :null => false
10
+ end
11
+ end
12
+
13
+ def down
14
+ end
15
+ end
@@ -0,0 +1,16 @@
1
+ class CreateItemHasUseRestrictions < ActiveRecord::Migration
2
+ def up
3
+ create_table "item_has_use_restrictions", :force => true do |t|
4
+ t.integer "item_id", :null => false
5
+ t.integer "use_restriction_id", :null => false
6
+ t.datetime "created_at", :null => false
7
+ t.datetime "updated_at", :null => false
8
+ end
9
+
10
+ add_index "item_has_use_restrictions", ["item_id"], :name => "index_item_has_use_restrictions_on_item_id"
11
+ add_index "item_has_use_restrictions", ["use_restriction_id"], :name => "index_item_has_use_restrictions_on_use_restriction_id"
12
+ end
13
+
14
+ def down
15
+ end
16
+ end
@@ -0,0 +1,26 @@
1
+ class CreateCheckouts < ActiveRecord::Migration
2
+ def up
3
+ create_table "checkouts", :force => true do |t|
4
+ t.integer "user_id"
5
+ t.integer "item_id", :null => false
6
+ t.integer "checkin_id"
7
+ t.integer "librarian_id"
8
+ t.integer "basket_id"
9
+ t.datetime "due_date"
10
+ t.integer "checkout_renewal_count", :default => 0, :null => false
11
+ t.integer "lock_version", :default => 0, :null => false
12
+ t.datetime "created_at", :null => false
13
+ t.datetime "updated_at", :null => false
14
+ end
15
+
16
+ add_index "checkouts", ["basket_id"], :name => "index_checkouts_on_basket_id"
17
+ add_index "checkouts", ["checkin_id"], :name => "index_checkouts_on_checkin_id"
18
+ add_index "checkouts", ["item_id", "basket_id"], :name => "index_checkouts_on_item_id_and_basket_id", :unique => true
19
+ add_index "checkouts", ["item_id"], :name => "index_checkouts_on_item_id"
20
+ add_index "checkouts", ["librarian_id"], :name => "index_checkouts_on_librarian_id"
21
+ add_index "checkouts", ["user_id"], :name => "index_checkouts_on_user_id"
22
+ end
23
+
24
+ def down
25
+ end
26
+ end
@@ -0,0 +1,23 @@
1
+ class CreateEvents < ActiveRecord::Migration
2
+ def up
3
+ create_table "events", :force => true do |t|
4
+ t.integer "library_id", :default => 1, :null => false
5
+ t.integer "event_category_id", :default => 1, :null => false
6
+ t.string "name"
7
+ t.text "note"
8
+ t.datetime "start_at"
9
+ t.datetime "end_at"
10
+ t.boolean "all_day", :default => false, :null => false
11
+ t.datetime "deleted_at"
12
+ t.datetime "created_at", :null => false
13
+ t.datetime "updated_at", :null => false
14
+ t.text "display_name"
15
+ end
16
+
17
+ add_index "events", ["event_category_id"], :name => "index_events_on_event_category_id"
18
+ add_index "events", ["library_id"], :name => "index_events_on_library_id"
19
+ end
20
+
21
+ def down
22
+ end
23
+ end
@@ -0,0 +1,518 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended to check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(:version => 20120325160112) do
15
+
16
+ create_table "baskets", :force => true do |t|
17
+ t.integer "user_id"
18
+ t.text "note"
19
+ t.string "type"
20
+ t.integer "lock_version", :default => 0, :null => false
21
+ t.datetime "created_at", :null => false
22
+ t.datetime "updated_at", :null => false
23
+ t.datetime "deleted_at"
24
+ end
25
+
26
+ add_index "baskets", ["type"], :name => "index_baskets_on_type"
27
+ add_index "baskets", ["user_id"], :name => "index_baskets_on_user_id"
28
+
29
+ create_table "carrier_types", :force => true do |t|
30
+ t.string "name", :null => false
31
+ t.text "display_name"
32
+ t.text "note"
33
+ t.integer "position"
34
+ t.datetime "created_at", :null => false
35
+ t.datetime "updated_at", :null => false
36
+ end
37
+
38
+ create_table "checked_items", :force => true do |t|
39
+ t.integer "item_id", :null => false
40
+ t.integer "basket_id", :null => false
41
+ t.datetime "due_date", :null => false
42
+ t.datetime "created_at", :null => false
43
+ t.datetime "updated_at", :null => false
44
+ t.datetime "deleted_at"
45
+ end
46
+
47
+ add_index "checked_items", ["basket_id"], :name => "index_checked_items_on_basket_id"
48
+ add_index "checked_items", ["item_id"], :name => "index_checked_items_on_item_id"
49
+
50
+ create_table "checkout_types", :force => true do |t|
51
+ t.string "name", :null => false
52
+ t.text "display_name"
53
+ t.text "note"
54
+ t.integer "position"
55
+ t.datetime "created_at", :null => false
56
+ t.datetime "updated_at", :null => false
57
+ end
58
+
59
+ create_table "checkouts", :force => true do |t|
60
+ t.integer "user_id"
61
+ t.integer "item_id", :null => false
62
+ t.integer "checkin_id"
63
+ t.integer "librarian_id"
64
+ t.integer "basket_id"
65
+ t.datetime "due_date"
66
+ t.integer "checkout_renewal_count", :default => 0, :null => false
67
+ t.integer "lock_version", :default => 0, :null => false
68
+ t.datetime "created_at", :null => false
69
+ t.datetime "updated_at", :null => false
70
+ end
71
+
72
+ add_index "checkouts", ["basket_id"], :name => "index_checkouts_on_basket_id"
73
+ add_index "checkouts", ["checkin_id"], :name => "index_checkouts_on_checkin_id"
74
+ add_index "checkouts", ["item_id", "basket_id"], :name => "index_checkouts_on_item_id_and_basket_id", :unique => true
75
+ add_index "checkouts", ["item_id"], :name => "index_checkouts_on_item_id"
76
+ add_index "checkouts", ["librarian_id"], :name => "index_checkouts_on_librarian_id"
77
+ add_index "checkouts", ["user_id"], :name => "index_checkouts_on_user_id"
78
+
79
+ create_table "circulation_statuses", :force => true do |t|
80
+ t.string "name", :null => false
81
+ t.text "display_name"
82
+ t.text "note"
83
+ t.integer "position"
84
+ t.datetime "created_at", :null => false
85
+ t.datetime "updated_at", :null => false
86
+ end
87
+
88
+ create_table "events", :force => true do |t|
89
+ t.integer "library_id", :default => 1, :null => false
90
+ t.integer "event_category_id", :default => 1, :null => false
91
+ t.string "name"
92
+ t.text "note"
93
+ t.datetime "start_at"
94
+ t.datetime "end_at"
95
+ t.boolean "all_day", :default => false, :null => false
96
+ t.datetime "deleted_at"
97
+ t.datetime "created_at", :null => false
98
+ t.datetime "updated_at", :null => false
99
+ t.text "display_name"
100
+ end
101
+
102
+ add_index "events", ["event_category_id"], :name => "index_events_on_event_category_id"
103
+ add_index "events", ["library_id"], :name => "index_events_on_library_id"
104
+
105
+ create_table "item_has_use_restrictions", :force => true do |t|
106
+ t.integer "item_id", :null => false
107
+ t.integer "use_restriction_id", :null => false
108
+ t.datetime "created_at", :null => false
109
+ t.datetime "updated_at", :null => false
110
+ end
111
+
112
+ add_index "item_has_use_restrictions", ["item_id"], :name => "index_item_has_use_restrictions_on_item_id"
113
+ add_index "item_has_use_restrictions", ["use_restriction_id"], :name => "index_item_has_use_restrictions_on_use_restriction_id"
114
+
115
+ create_table "items", :force => true do |t|
116
+ t.string "call_number"
117
+ t.string "item_identifier"
118
+ t.integer "circulation_status_id", :default => 5, :null => false
119
+ t.integer "checkout_type_id", :default => 1, :null => false
120
+ t.datetime "created_at", :null => false
121
+ t.datetime "updated_at", :null => false
122
+ t.datetime "deleted_at"
123
+ t.integer "shelf_id", :default => 1, :null => false
124
+ t.integer "basket_id"
125
+ t.boolean "include_supplements", :default => false, :null => false
126
+ t.integer "checkouts_count", :default => 0, :null => false
127
+ t.integer "owns_count", :default => 0, :null => false
128
+ t.integer "resource_has_subjects_count", :default => 0, :null => false
129
+ t.text "note"
130
+ t.string "url"
131
+ t.integer "price"
132
+ t.integer "lock_version", :default => 0, :null => false
133
+ t.integer "required_role_id", :default => 1, :null => false
134
+ t.string "state"
135
+ t.integer "required_score", :default => 0, :null => false
136
+ end
137
+
138
+ add_index "items", ["checkout_type_id"], :name => "index_items_on_checkout_type_id"
139
+ add_index "items", ["circulation_status_id"], :name => "index_items_on_circulation_status_id"
140
+ add_index "items", ["item_identifier"], :name => "index_items_on_item_identifier"
141
+ add_index "items", ["required_role_id"], :name => "index_items_on_required_role_id"
142
+ add_index "items", ["shelf_id"], :name => "index_items_on_shelf_id"
143
+
144
+ create_table "lending_policies", :force => true do |t|
145
+ t.integer "item_id", :null => false
146
+ t.integer "user_group_id", :null => false
147
+ t.integer "loan_period", :default => 0, :null => false
148
+ t.datetime "fixed_due_date"
149
+ t.integer "renewal", :default => 0, :null => false
150
+ t.decimal "fine", :default => 0.0, :null => false
151
+ t.text "note"
152
+ t.integer "position"
153
+ t.datetime "created_at", :null => false
154
+ t.datetime "updated_at", :null => false
155
+ end
156
+
157
+ add_index "lending_policies", ["item_id"], :name => "index_lending_policies_on_item_id"
158
+ add_index "lending_policies", ["user_group_id"], :name => "index_lending_policies_on_user_group_id"
159
+
160
+ create_table "libraries", :force => true do |t|
161
+ t.integer "patron_id"
162
+ t.string "patron_type"
163
+ t.string "name", :null => false
164
+ t.text "display_name"
165
+ t.string "short_display_name", :null => false
166
+ t.string "zip_code"
167
+ t.text "street"
168
+ t.text "locality"
169
+ t.text "region"
170
+ t.string "telephone_number_1"
171
+ t.string "telephone_number_2"
172
+ t.string "fax_number"
173
+ t.text "note"
174
+ t.integer "call_number_rows", :default => 1, :null => false
175
+ t.string "call_number_delimiter", :default => "|", :null => false
176
+ t.integer "library_group_id", :default => 1, :null => false
177
+ t.integer "users_count", :default => 0, :null => false
178
+ t.integer "position"
179
+ t.integer "country_id"
180
+ t.datetime "created_at", :null => false
181
+ t.datetime "updated_at", :null => false
182
+ t.datetime "deleted_at"
183
+ t.text "opening_hour"
184
+ t.float "latitude"
185
+ t.float "longitude"
186
+ t.string "calil_systemid"
187
+ t.text "calil_neighborhood_systemid"
188
+ end
189
+
190
+ add_index "libraries", ["library_group_id"], :name => "index_libraries_on_library_group_id"
191
+ add_index "libraries", ["name"], :name => "index_libraries_on_name", :unique => true
192
+ add_index "libraries", ["patron_id"], :name => "index_libraries_on_patron_id", :unique => true
193
+
194
+ create_table "library_groups", :force => true do |t|
195
+ t.string "name", :null => false
196
+ t.text "display_name"
197
+ t.string "short_name", :null => false
198
+ t.string "email"
199
+ t.text "my_networks"
200
+ t.boolean "use_dsbl", :default => false, :null => false
201
+ t.text "dsbl_list"
202
+ t.text "login_banner"
203
+ t.text "note"
204
+ t.boolean "post_to_union_catalog", :default => false, :null => false
205
+ t.integer "country_id"
206
+ t.datetime "created_at", :null => false
207
+ t.datetime "updated_at", :null => false
208
+ t.text "admin_networks"
209
+ t.boolean "allow_bookmark_external_url", :default => false, :null => false
210
+ t.integer "position"
211
+ t.string "url", :default => "http://localhost:3000/"
212
+ end
213
+
214
+ create_table "manifestations", :force => true do |t|
215
+ t.text "original_title", :null => false
216
+ t.text "title_alternative"
217
+ t.text "title_transcription"
218
+ t.string "classification_number"
219
+ t.string "identifier"
220
+ t.datetime "date_of_publication"
221
+ t.datetime "date_copyrighted"
222
+ t.datetime "created_at", :null => false
223
+ t.datetime "updated_at", :null => false
224
+ t.datetime "deleted_at"
225
+ t.string "access_address"
226
+ t.integer "language_id", :default => 1, :null => false
227
+ t.integer "carrier_type_id", :default => 1, :null => false
228
+ t.integer "extent_id", :default => 1, :null => false
229
+ t.integer "start_page"
230
+ t.integer "end_page"
231
+ t.decimal "height"
232
+ t.decimal "width"
233
+ t.decimal "depth"
234
+ t.string "isbn"
235
+ t.string "isbn10"
236
+ t.string "wrong_isbn"
237
+ t.string "nbn"
238
+ t.string "lccn"
239
+ t.string "oclc_number"
240
+ t.string "issn"
241
+ t.integer "price"
242
+ t.text "fulltext"
243
+ t.string "volume_number_string"
244
+ t.string "issue_number_string"
245
+ t.string "serial_number_string"
246
+ t.integer "edition"
247
+ t.text "note"
248
+ t.boolean "repository_content", :default => false, :null => false
249
+ t.integer "lock_version", :default => 0, :null => false
250
+ t.integer "required_role_id", :default => 1, :null => false
251
+ t.string "state"
252
+ t.integer "required_score", :default => 0, :null => false
253
+ t.integer "frequency_id", :default => 1, :null => false
254
+ t.boolean "subscription_master", :default => false, :null => false
255
+ t.integer "ipaper_id"
256
+ t.string "ipaper_access_key"
257
+ t.string "attachment_file_name"
258
+ t.string "attachment_content_type"
259
+ t.integer "attachment_file_size"
260
+ t.datetime "attachment_updated_at"
261
+ t.integer "nii_type_id"
262
+ t.text "title_alternative_transcription"
263
+ t.text "description"
264
+ t.text "abstract"
265
+ t.datetime "available_at"
266
+ t.datetime "valid_until"
267
+ t.datetime "date_submitted"
268
+ t.datetime "date_accepted"
269
+ t.datetime "date_caputured"
270
+ t.string "ndl_bib_id"
271
+ t.string "file_hash"
272
+ t.string "pub_date"
273
+ t.boolean "periodical_master", :default => false, :null => false
274
+ t.boolean "periodical", :default => false, :null => false
275
+ t.integer "volume_number"
276
+ t.integer "issue_number"
277
+ t.integer "serial_number"
278
+ t.string "ndc"
279
+ t.boolean "except_recent", :default => false
280
+ t.string "exinfo_1"
281
+ t.string "exinfo_2"
282
+ t.string "exinfo_3"
283
+ t.string "exinfo_4"
284
+ t.string "exinfo_5"
285
+ t.string "edition_display_value"
286
+ t.string "other_number_list"
287
+ t.string "marc_number"
288
+ t.text "supplement"
289
+ end
290
+
291
+ add_index "manifestations", ["access_address"], :name => "index_manifestations_on_access_address"
292
+ add_index "manifestations", ["carrier_type_id"], :name => "index_manifestations_on_carrier_type_id"
293
+ add_index "manifestations", ["created_at"], :name => "index_manifestations_on_created_at"
294
+ add_index "manifestations", ["deleted_at"], :name => "index_manifestations_on_deleted_at"
295
+ add_index "manifestations", ["frequency_id"], :name => "index_manifestations_on_frequency_id"
296
+ add_index "manifestations", ["identifier"], :name => "index_manifestations_on_manifestation_identifier"
297
+ add_index "manifestations", ["isbn"], :name => "index_manifestations_on_isbn"
298
+ add_index "manifestations", ["issn"], :name => "index_manifestations_on_issn"
299
+ add_index "manifestations", ["lccn"], :name => "index_manifestations_on_lccn"
300
+ add_index "manifestations", ["nbn"], :name => "index_manifestations_on_nbn"
301
+ add_index "manifestations", ["ndl_bib_id"], :name => "index_manifestations_on_ndl_bib_id"
302
+ add_index "manifestations", ["nii_type_id"], :name => "index_manifestations_on_nii_type_id"
303
+ add_index "manifestations", ["oclc_number"], :name => "index_manifestations_on_oclc_number"
304
+ add_index "manifestations", ["periodical"], :name => "index_manifestations_on_periodical"
305
+ add_index "manifestations", ["required_role_id"], :name => "index_manifestations_on_required_role_id"
306
+ add_index "manifestations", ["updated_at"], :name => "index_manifestations_on_updated_at"
307
+
308
+ create_table "patrons", :force => true do |t|
309
+ t.integer "user_id"
310
+ t.string "last_name"
311
+ t.string "middle_name"
312
+ t.string "first_name"
313
+ t.string "last_name_transcription"
314
+ t.string "middle_name_transcription"
315
+ t.string "first_name_transcription"
316
+ t.string "corporate_name"
317
+ t.string "corporate_name_transcription"
318
+ t.string "full_name"
319
+ t.text "full_name_transcription"
320
+ t.text "full_name_alternative"
321
+ t.datetime "created_at", :null => false
322
+ t.datetime "updated_at", :null => false
323
+ t.datetime "deleted_at"
324
+ t.string "zip_code_1"
325
+ t.string "zip_code_2"
326
+ t.text "address_1"
327
+ t.text "address_2"
328
+ t.text "address_1_note"
329
+ t.text "address_2_note"
330
+ t.string "telephone_number_1"
331
+ t.string "telephone_number_2"
332
+ t.string "fax_number_1"
333
+ t.string "fax_number_2"
334
+ t.text "other_designation"
335
+ t.text "place"
336
+ t.text "street"
337
+ t.text "locality"
338
+ t.text "region"
339
+ t.datetime "date_of_birth"
340
+ t.datetime "date_of_death"
341
+ t.integer "language_id", :default => 1, :null => false
342
+ t.integer "country_id", :default => 1, :null => false
343
+ t.integer "patron_type_id", :default => 1, :null => false
344
+ t.integer "lock_version", :default => 0, :null => false
345
+ t.text "note"
346
+ t.integer "required_role_id", :default => 1, :null => false
347
+ t.integer "required_score", :default => 0, :null => false
348
+ t.string "state"
349
+ t.text "email"
350
+ t.text "url"
351
+ t.text "full_name_alternative_transcription"
352
+ t.string "title"
353
+ t.string "birth_date"
354
+ t.string "death_date"
355
+ t.datetime "note_update_at"
356
+ t.string "note_update_by"
357
+ t.string "note_update_library"
358
+ t.string "extelephone_number_1"
359
+ t.string "extelephone_number_2"
360
+ t.integer "telephone_number_1_type_id"
361
+ t.integer "telephone_number_2_type_id"
362
+ t.integer "extelephone_number_1_type_id"
363
+ t.integer "extelephone_number_2_type_id"
364
+ t.integer "fax_number_1_type_id"
365
+ t.integer "fax_number_2_type_id"
366
+ t.string "patron_identifier"
367
+ end
368
+
369
+ add_index "patrons", ["country_id"], :name => "index_patrons_on_country_id"
370
+ add_index "patrons", ["full_name"], :name => "index_patrons_on_full_name"
371
+ add_index "patrons", ["language_id"], :name => "index_patrons_on_language_id"
372
+ add_index "patrons", ["patron_identifier"], :name => "index_patrons_on_patron_identifier"
373
+ add_index "patrons", ["required_role_id"], :name => "index_patrons_on_required_role_id"
374
+ add_index "patrons", ["user_id"], :name => "index_patrons_on_user_id", :unique => true
375
+
376
+ create_table "roles", :force => true do |t|
377
+ t.string "name", :null => false
378
+ t.string "display_name"
379
+ t.text "note"
380
+ t.datetime "created_at", :null => false
381
+ t.datetime "updated_at", :null => false
382
+ t.integer "score", :default => 0, :null => false
383
+ t.integer "position"
384
+ end
385
+
386
+ create_table "shelves", :force => true do |t|
387
+ t.string "name", :null => false
388
+ t.text "display_name"
389
+ t.text "note"
390
+ t.integer "library_id", :default => 1, :null => false
391
+ t.integer "items_count", :default => 0, :null => false
392
+ t.integer "position"
393
+ t.datetime "created_at", :null => false
394
+ t.datetime "updated_at", :null => false
395
+ t.datetime "deleted_at"
396
+ t.integer "open_access", :default => 0, :null => false
397
+ end
398
+
399
+ create_table "use_restrictions", :force => true do |t|
400
+ t.string "name", :null => false
401
+ t.text "display_name"
402
+ t.text "note"
403
+ t.integer "position"
404
+ t.datetime "created_at", :null => false
405
+ t.datetime "updated_at", :null => false
406
+ end
407
+
408
+ create_table "user_group_has_checkout_types", :force => true do |t|
409
+ t.integer "user_group_id", :null => false
410
+ t.integer "checkout_type_id", :null => false
411
+ t.integer "checkout_limit", :default => 0, :null => false
412
+ t.integer "checkout_period", :default => 0, :null => false
413
+ t.integer "checkout_renewal_limit", :default => 0, :null => false
414
+ t.integer "reservation_limit", :default => 0, :null => false
415
+ t.integer "reservation_expired_period", :default => 7, :null => false
416
+ t.boolean "set_due_date_before_closing_day", :default => false, :null => false
417
+ t.datetime "fixed_due_date"
418
+ t.text "note"
419
+ t.integer "position"
420
+ t.datetime "created_at", :null => false
421
+ t.datetime "updated_at", :null => false
422
+ t.integer "current_checkout_count"
423
+ end
424
+
425
+ add_index "user_group_has_checkout_types", ["checkout_type_id"], :name => "index_user_group_has_checkout_types_on_checkout_type_id"
426
+ add_index "user_group_has_checkout_types", ["user_group_id"], :name => "index_user_group_has_checkout_types_on_user_group_id"
427
+
428
+ create_table "user_groups", :force => true do |t|
429
+ t.string "name"
430
+ t.string "string"
431
+ t.text "display_name"
432
+ t.text "note"
433
+ t.integer "position"
434
+ t.datetime "created_at", :null => false
435
+ t.datetime "updated_at", :null => false
436
+ t.datetime "deleted_at"
437
+ t.integer "valid_period_for_new_user", :default => 0, :null => false
438
+ t.datetime "expired_at"
439
+ t.integer "number_of_day_to_notify_overdue", :default => 1, :null => false
440
+ t.integer "number_of_day_to_notify_due_date", :default => 7, :null => false
441
+ t.integer "number_of_time_to_notify_overdue", :default => 3, :null => false
442
+ end
443
+
444
+ create_table "user_has_roles", :force => true do |t|
445
+ t.integer "user_id"
446
+ t.integer "role_id"
447
+ t.datetime "created_at", :null => false
448
+ t.datetime "updated_at", :null => false
449
+ end
450
+
451
+ create_table "users", :force => true do |t|
452
+ t.string "email", :default => ""
453
+ t.string "encrypted_password"
454
+ t.string "confirmation_token"
455
+ t.datetime "confirmed_at"
456
+ t.datetime "confirmation_sent_at"
457
+ t.string "reset_password_token"
458
+ t.datetime "reset_password_sent_at"
459
+ t.string "remember_token"
460
+ t.datetime "remember_created_at"
461
+ t.integer "sign_in_count", :default => 0
462
+ t.datetime "current_sign_in_at"
463
+ t.datetime "last_sign_in_at"
464
+ t.string "current_sign_in_ip"
465
+ t.string "last_sign_in_ip"
466
+ t.integer "failed_attempts", :default => 0
467
+ t.string "unlock_token"
468
+ t.datetime "locked_at"
469
+ t.string "authentication_token"
470
+ t.string "password_salt"
471
+ t.datetime "created_at", :null => false
472
+ t.datetime "updated_at", :null => false
473
+ t.datetime "deleted_at"
474
+ t.string "username"
475
+ t.integer "library_id", :default => 1, :null => false
476
+ t.integer "user_group_id", :default => 1, :null => false
477
+ t.integer "reserves_count", :default => 0, :null => false
478
+ t.datetime "expired_at"
479
+ t.integer "libraries_count", :default => 0, :null => false
480
+ t.integer "bookmarks_count", :default => 0, :null => false
481
+ t.integer "checkouts_count", :default => 0, :null => false
482
+ t.string "checkout_icalendar_token"
483
+ t.integer "questions_count", :default => 0, :null => false
484
+ t.integer "answers_count", :default => 0, :null => false
485
+ t.string "answer_feed_token"
486
+ t.integer "due_date_reminder_days", :default => 1, :null => false
487
+ t.text "note"
488
+ t.boolean "share_bookmarks", :default => false, :null => false
489
+ t.boolean "save_search_history", :default => false, :null => false
490
+ t.boolean "save_checkout_history", :default => false, :null => false
491
+ t.integer "required_role_id", :default => 1, :null => false
492
+ t.text "keyword_list"
493
+ t.string "user_number"
494
+ t.string "state"
495
+ t.integer "required_score", :default => 0, :null => false
496
+ t.string "locale"
497
+ t.string "openid_identifier"
498
+ t.string "oauth_token"
499
+ t.string "oauth_secret"
500
+ t.string "enju_access_key"
501
+ t.boolean "unable"
502
+ end
503
+
504
+ add_index "users", ["confirmation_token"], :name => "index_users_on_confirmation_token", :unique => true
505
+ add_index "users", ["email"], :name => "index_users_on_email"
506
+ add_index "users", ["enju_access_key"], :name => "index_users_on_enju_access_key", :unique => true
507
+ add_index "users", ["oauth_secret"], :name => "index_users_on_oauth_secret", :unique => true
508
+ add_index "users", ["oauth_token"], :name => "index_users_on_oauth_token", :unique => true
509
+ add_index "users", ["openid_identifier"], :name => "index_users_on_openid_identifier"
510
+ add_index "users", ["remember_token"], :name => "index_users_on_remember_token", :unique => true
511
+ add_index "users", ["required_role_id"], :name => "index_users_on_required_role_id"
512
+ add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
513
+ add_index "users", ["unlock_token"], :name => "index_users_on_unlock_token", :unique => true
514
+ add_index "users", ["user_group_id"], :name => "index_users_on_user_group_id"
515
+ add_index "users", ["user_number"], :name => "index_users_on_user_number", :unique => true
516
+ add_index "users", ["username"], :name => "index_users_on_username", :unique => true
517
+
518
+ end