Added duration to tasks. Annotated all models.

This commit is contained in:
benni 2011-05-07 20:50:39 +02:00
parent face58ebef
commit dcd2a514a6
30 changed files with 494 additions and 431 deletions

View file

@ -9,3 +9,7 @@ gem "prawn", '<=0.6.3'
gem 'haml', '>=2.0.6'
gem 'routing-filter', '0.0.1', :require => 'routing_filter'
gem 'sqlite3-ruby'
group :development do
gem 'annotate'
end

View file

@ -11,6 +11,7 @@ GEM
activeresource (2.3.10)
activesupport (= 2.3.10)
activesupport (2.3.10)
annotate (2.4.0)
fastercsv (1.5.4)
haml (3.0.25)
mysql (2.8.1)
@ -40,6 +41,7 @@ PLATFORMS
ruby
DEPENDENCIES
annotate
fastercsv
haml (>= 2.0.6)
mysql

View file

@ -1,13 +1,3 @@
# == Schema Information
#
# Table name: assignments
#
# id :integer not null, primary key
# user_id :integer default(0), not null
# task_id :integer default(0), not null
# accepted :boolean
#
class Assignment < ActiveRecord::Base
belongs_to :user
@ -23,3 +13,14 @@ class Assignment < ActiveRecord::Base
self.task.update_attribute(:assigned, false) if self.task.assignments.empty?
end
end
# == Schema Information
#
# Table name: assignments
#
# id :integer not null, primary key
# user_id :integer default(0), not null
# task_id :integer default(0), not null
# accepted :boolean default(FALSE)
#

View file

@ -1,13 +1,3 @@
# == Schema Information
#
# Table name: deliveries
#
# id :integer not null, primary key
# supplier_id :integer
# delivered_on :date
# created_at :datetime
#
class Delivery < ActiveRecord::Base
belongs_to :supplier
@ -27,3 +17,15 @@ class Delivery < ActiveRecord::Base
end
end
# == Schema Information
#
# Table name: deliveries
#
# id :integer not null, primary key
# supplier_id :integer
# delivered_on :date
# created_at :datetime
# note :text
#

View file

@ -1,30 +1,3 @@
# == Schema Information
#
# Table name: groups
#
# id :integer not null, primary key
# type :string(255) default(""), not null
# name :string(255) default(""), not null
# description :string(255)
# account_balance :decimal(, ) default(0.0), not null
# account_updated :datetime
# created_on :datetime not null
# role_admin :boolean not null
# role_suppliers :boolean not null
# role_article_meta :boolean not null
# role_finance :boolean not null
# role_orders :boolean not null
# weekly_task :boolean
# weekday :integer
# task_name :string(255)
# task_description :string(255)
# task_required_users :integer default(1)
# deleted_at :datetime
# contact_person :string(255)
# contact_phone :string(255)
# contact_address :string(255)
#
# Groups organize the User.
# A Member gets the roles from the Group
class Group < ActiveRecord::Base
@ -67,3 +40,32 @@ class Group < ActiveRecord::Base
end
end
# == Schema Information
#
# Table name: groups
#
# id :integer not null, primary key
# type :string(255) default(""), not null
# name :string(255) default(""), not null
# description :string(255)
# account_balance :decimal(8, 2) default(0.0), not null
# account_updated :datetime
# created_on :datetime not null
# role_admin :boolean default(FALSE), not null
# role_suppliers :boolean default(FALSE), not null
# role_article_meta :boolean default(FALSE), not null
# role_finance :boolean default(FALSE), not null
# role_orders :boolean default(FALSE), not null
# weekly_task :boolean default(FALSE)
# weekday :integer
# task_name :string(255)
# task_description :string(255)
# task_required_users :integer default(1)
# deleted_at :datetime
# contact_person :string(255)
# contact_phone :string(255)
# contact_address :string(255)
# stats :text
#

View file

@ -1,16 +1,3 @@
# == Schema Information
#
# Table name: group_order_articles
#
# id :integer not null, primary key
# group_order_id :integer default(0), not null
# order_article_id :integer default(0), not null
# quantity :integer default(0), not null
# tolerance :integer default(0), not null
# updated_on :datetime not null
# result :decimal(, )
#
# A GroupOrderArticle stores the sum of how many items of an OrderArticle are ordered as part of a GroupOrder.
# The chronologically order of the Ordergroup - activity are stored in GroupOrderArticleQuantity
#
@ -171,3 +158,17 @@ class GroupOrderArticle < ActiveRecord::Base
end
end
# == Schema Information
#
# Table name: group_order_articles
#
# id :integer not null, primary key
# group_order_id :integer default(0), not null
# order_article_id :integer default(0), not null
# quantity :integer default(0), not null
# tolerance :integer default(0), not null
# updated_on :datetime not null
# result :decimal(8, 3)
#

View file

@ -1,22 +1,3 @@
# == Schema Information
#
# Table name: invoices
#
# id :integer not null, primary key
# supplier_id :integer
# delivery_id :integer
# number :string(255)
# date :date
# paid_on :date
# note :text
# amount :decimal(8, 2) default(0.0), not null
# created_at :datetime
# updated_at :datetime
# order_id :integer
# deposit :decimal(8, 2) default(0.0), not null
# deposit_credit :decimal(8, 2) default(0.0), not null
#
class Invoice < ActiveRecord::Base
belongs_to :supplier
@ -47,3 +28,23 @@ class Invoice < ActiveRecord::Base
amount - deposit + deposit_credit
end
end
# == Schema Information
#
# Table name: invoices
#
# id :integer not null, primary key
# supplier_id :integer
# delivery_id :integer
# order_id :integer
# number :string(255)
# date :date
# paid_on :date
# note :text
# amount :decimal(8, 2) default(0.0), not null
# deposit :decimal(8, 2) default(0.0), not null
# deposit_credit :decimal(8, 2) default(0.0), not null
# created_at :datetime
# updated_at :datetime
#

View file

@ -1,17 +1,3 @@
# == Schema Information
#
# Table name: messages
#
# id :integer not null, primary key
# sender_id :integer
# recipients_ids :text
# subject :string(255) not null
# body :text
# email_state :integer default(0), not null
# private :boolean
# created_at :datetime
#
class Message < ActiveRecord::Base
belongs_to :sender, :class_name => "User", :foreign_key => "sender_id"
@ -89,3 +75,18 @@ class Message < ActiveRecord::Base
end
end
end
# == Schema Information
#
# Table name: messages
#
# id :integer not null, primary key
# sender_id :integer
# recipients_ids :text
# subject :string(255) not null
# body :text
# email_state :integer default(0), not null
# private :boolean default(FALSE)
# created_at :datetime
#

View file

@ -1,30 +1,3 @@
# == Schema Information
#
# Table name: groups
#
# id :integer not null, primary key
# type :string(255) default(""), not null
# name :string(255) default(""), not null
# description :string(255)
# account_balance :decimal(, ) default(0.0), not null
# account_updated :datetime
# created_on :datetime not null
# role_admin :boolean not null
# role_suppliers :boolean not null
# role_article_meta :boolean not null
# role_finance :boolean not null
# role_orders :boolean not null
# weekly_task :boolean
# weekday :integer
# task_name :string(255)
# task_description :string(255)
# task_required_users :integer default(1)
# deleted_at :datetime
# contact_person :string(255)
# contact_phone :string(255)
# contact_address :string(255)
#
# Ordergroups can order, they are "children" of the class Group
#
# Ordergroup have the following attributes, in addition to Group
@ -109,3 +82,32 @@ class Ordergroup < Group
end
end
# == Schema Information
#
# Table name: groups
#
# id :integer not null, primary key
# type :string(255) default(""), not null
# name :string(255) default(""), not null
# description :string(255)
# account_balance :decimal(8, 2) default(0.0), not null
# account_updated :datetime
# created_on :datetime not null
# role_admin :boolean default(FALSE), not null
# role_suppliers :boolean default(FALSE), not null
# role_article_meta :boolean default(FALSE), not null
# role_finance :boolean default(FALSE), not null
# role_orders :boolean default(FALSE), not null
# weekly_task :boolean default(FALSE)
# weekday :integer
# task_name :string(255)
# task_description :string(255)
# task_required_users :integer default(1)
# deleted_at :datetime
# contact_person :string(255)
# contact_phone :string(255)
# contact_address :string(255)
# stats :text
#

View file

@ -1,18 +1,3 @@
# == Schema Information
#
# Table name: pages
#
# id :integer not null, primary key
# title :string(255)
# body :text
# permalink :string(255)
# lock_version :integer default(0)
# updated_by :integer
# redirect :integer
# created_at :datetime
# updated_at :datetime
#
class Page < ActiveRecord::Base
belongs_to :user, :foreign_key => 'updated_by'
@ -66,3 +51,20 @@ class Page < ActiveRecord::Base
end
end
end
# == Schema Information
#
# Table name: pages
#
# id :integer not null, primary key
# title :string(255)
# body :text
# permalink :string(255)
# lock_version :integer default(0)
# updated_by :integer
# redirect :integer
# parent_id :integer
# created_at :datetime
# updated_at :datetime
#

View file

@ -1,5 +1,20 @@
class SharedSupplier < ActiveRecord::Base
# connect to database from sharedLists-Application
SharedSupplier.establish_connection(Foodsoft.config[:shared_lists])
# set correct table_name in external DB
set_table_name :suppliers
has_one :supplier
has_many :shared_articles, :foreign_key => :supplier_id
# save the lists as an array
serialize :lists
end
# == Schema Information
# Schema version: 20090102171850
#
# Table name: suppliers
#
@ -16,20 +31,9 @@
# created_on :datetime
# updated_on :datetime
# lists :string(255)
# bnn_sync :boolean(1) default(FALSE)
# bnn_host :string(255)
# bnn_user :string(255)
# bnn_password :string(255)
#
class SharedSupplier < ActiveRecord::Base
# connect to database from sharedLists-Application
SharedSupplier.establish_connection(Foodsoft.config[:shared_lists])
# set correct table_name in external DB
set_table_name :suppliers
has_one :supplier
has_many :shared_articles, :foreign_key => :supplier_id
# save the lists as an array
serialize :lists
end

View file

@ -1,29 +1,3 @@
# == Schema Information
#
# Table name: articles
#
# id :integer not null, primary key
# name :string(255) default(""), not null
# supplier_id :integer default(0), not null
# article_category_id :integer default(0), not null
# unit :string(255) default(""), not null
# note :string(255)
# availability :boolean default(TRUE), not null
# manufacturer :string(255)
# origin :string(255)
# shared_updated_on :datetime
# price :decimal(, )
# tax :float
# deposit :decimal(, ) default(0.0)
# unit_quantity :integer default(1), not null
# order_number :string(255)
# created_at :datetime
# updated_at :datetime
# quantity :integer default(0)
# deleted_at :datetime
# type :string(255)
#
class StockArticle < Article
has_many :stock_changes
@ -63,3 +37,30 @@ class StockArticle < Article
true
end
end
# == Schema Information
#
# Table name: articles
#
# id :integer not null, primary key
# name :string(255) default(""), not null
# supplier_id :integer default(0), not null
# article_category_id :integer default(0), not null
# unit :string(255) default(""), not null
# note :string(255)
# availability :boolean default(TRUE), not null
# manufacturer :string(255)
# origin :string(255)
# shared_updated_on :datetime
# price :decimal(8, 2)
# tax :float
# deposit :decimal(8, 2) default(0.0)
# unit_quantity :integer default(1), not null
# order_number :string(255)
# created_at :datetime
# updated_at :datetime
# deleted_at :datetime
# type :string(255)
# quantity :integer default(0)
#

View file

@ -1,19 +1,3 @@
# == Schema Information
#
# Table name: tasks
#
# id :integer not null, primary key
# name :string(255) default(""), not null
# description :string(255)
# due_date :date
# done :boolean
# workgroup_id :integer
# assigned :boolean
# created_on :datetime not null
# updated_on :datetime not null
# required_users :integer default(1)
#
class Task < ActiveRecord::Base
has_many :assignments, :dependent => :destroy
has_many :users, :through => :assignments
@ -87,3 +71,22 @@ class Task < ActiveRecord::Base
end
end
end
# == Schema Information
#
# Table name: tasks
#
# id :integer not null, primary key
# name :string(255) default(""), not null
# description :string(255)
# due_date :date
# done :boolean default(FALSE)
# workgroup_id :integer
# assigned :boolean default(FALSE)
# created_on :datetime not null
# updated_on :datetime not null
# required_users :integer default(1)
# weekly :boolean
# duration :integer
#

View file

@ -1,30 +1,3 @@
# == Schema Information
#
# Table name: groups
#
# id :integer not null, primary key
# type :string(255) default(""), not null
# name :string(255) default(""), not null
# description :string(255)
# account_balance :decimal(, ) default(0.0), not null
# account_updated :datetime
# created_on :datetime not null
# role_admin :boolean not null
# role_suppliers :boolean not null
# role_article_meta :boolean not null
# role_finance :boolean not null
# role_orders :boolean not null
# weekly_task :boolean
# weekday :integer
# task_name :string(255)
# task_description :string(255)
# task_required_users :integer default(1)
# deleted_at :datetime
# contact_person :string(255)
# contact_phone :string(255)
# contact_address :string(255)
#
class Workgroup < Group
has_many :tasks
@ -70,3 +43,32 @@ class Workgroup < Group
end
end
# == Schema Information
#
# Table name: groups
#
# id :integer not null, primary key
# type :string(255) default(""), not null
# name :string(255) default(""), not null
# description :string(255)
# account_balance :decimal(8, 2) default(0.0), not null
# account_updated :datetime
# created_on :datetime not null
# role_admin :boolean default(FALSE), not null
# role_suppliers :boolean default(FALSE), not null
# role_article_meta :boolean default(FALSE), not null
# role_finance :boolean default(FALSE), not null
# role_orders :boolean default(FALSE), not null
# weekly_task :boolean default(FALSE)
# weekday :integer
# task_name :string(255)
# task_description :string(255)
# task_required_users :integer default(1)
# deleted_at :datetime
# contact_person :string(255)
# contact_phone :string(255)
# contact_address :string(255)
# stats :text
#

View file

@ -0,0 +1,9 @@
class AddDurationToTasks < ActiveRecord::Migration
def self.up
add_column :tasks, :duration, :integer
end
def self.down
remove_column :tasks, :duration
end
end

View file

@ -9,7 +9,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20090907120012) do
ActiveRecord::Schema.define(:version => 20110507184920) do
create_table "article_categories", :force => true do |t|
t.string "name", :default => "", :null => false
@ -261,10 +261,6 @@ ActiveRecord::Schema.define(:version => 20090907120012) do
add_index "pages", ["permalink"], :name => "index_pages_on_permalink"
add_index "pages", ["title"], :name => "index_pages_on_title"
create_table "schema_info", :id => false, :force => true do |t|
t.integer "version"
end
create_table "stock_changes", :force => true do |t|
t.integer "delivery_id"
t.integer "order_id"
@ -315,6 +311,7 @@ ActiveRecord::Schema.define(:version => 20090907120012) do
t.datetime "updated_on", :null => false
t.integer "required_users", :default => 1
t.boolean "weekly"
t.integer "duration"
end
add_index "tasks", ["due_date"], :name => "index_tasks_on_due_date"

View file

@ -1,29 +1,3 @@
# == Schema Information
#
# Table name: articles
#
# id :integer not null, primary key
# name :string(255) default(""), not null
# supplier_id :integer default(0), not null
# article_category_id :integer default(0), not null
# unit :string(255) default(""), not null
# note :string(255)
# availability :boolean default(TRUE), not null
# manufacturer :string(255)
# origin :string(255)
# shared_updated_on :datetime
# price :decimal(, )
# tax :float
# deposit :decimal(, ) default(0.0)
# unit_quantity :integer default(1), not null
# order_number :string(255)
# created_at :datetime
# updated_at :datetime
# quantity :integer default(0)
# deleted_at :datetime
# type :string(255)
#
# == Schema Information
<<<<<<< HEAD:test/fixtures/articles.yml
=======
@ -100,3 +74,28 @@ applejuice:
unit: 1L
price: 1.33
tax: 7.0
# == Schema Information
#
# Table name: articles
#
# id :integer(4) not null, primary key
# name :string(255) not null
# supplier_id :integer(4) not null
# number :string(255)
# note :string(255)
# manufacturer :string(255)
# origin :string(255)
# unit :string(255)
# price :decimal(8, 2) default(0.0), not null
# tax :decimal(3, 1) default(7.0), not null
# deposit :decimal(8, 2) default(0.0), not null
# unit_quantity :decimal(4, 1) default(1.0), not null
# scale_quantity :decimal(4, 2)
# scale_price :decimal(8, 2)
# created_on :datetime
# updated_on :datetime
# list :string(255)
#

View file

@ -1,3 +1,5 @@
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
# == Schema Information
#
# Table name: assignments
@ -5,7 +7,6 @@
# id :integer not null, primary key
# user_id :integer default(0), not null
# task_id :integer default(0), not null
# accepted :boolean
# accepted :boolean default(FALSE)
#
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html

View file

@ -1,30 +1,3 @@
# == Schema Information
#
# Table name: groups
#
# id :integer not null, primary key
# type :string(255) default(""), not null
# name :string(255) default(""), not null
# description :string(255)
# account_balance :decimal(, ) default(0.0), not null
# account_updated :datetime
# created_on :datetime not null
# role_admin :boolean not null
# role_suppliers :boolean not null
# role_article_meta :boolean not null
# role_finance :boolean not null
# role_orders :boolean not null
# weekly_task :boolean
# weekday :integer
# task_name :string(255)
# task_description :string(255)
# task_required_users :integer default(1)
# deleted_at :datetime
# contact_person :string(255)
# contact_phone :string(255)
# contact_address :string(255)
#
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
admins:
type: Workgroup
@ -43,3 +16,32 @@ bananas:
contact_person: Tim
contact_phone: 030 123132456
contact_address: Waldermarstrasse 43, 10988 Berlin
# == Schema Information
#
# Table name: groups
#
# id :integer not null, primary key
# type :string(255) default(""), not null
# name :string(255) default(""), not null
# description :string(255)
# account_balance :decimal(8, 2) default(0.0), not null
# account_updated :datetime
# created_on :datetime not null
# role_admin :boolean default(FALSE), not null
# role_suppliers :boolean default(FALSE), not null
# role_article_meta :boolean default(FALSE), not null
# role_finance :boolean default(FALSE), not null
# role_orders :boolean default(FALSE), not null
# weekly_task :boolean default(FALSE)
# weekday :integer
# task_name :string(255)
# task_description :string(255)
# task_required_users :integer default(1)
# deleted_at :datetime
# contact_person :string(255)
# contact_phone :string(255)
# contact_address :string(255)
# stats :text
#

View file

@ -1,3 +1,6 @@
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
# == Schema Information
#
# Table name: messages
@ -8,9 +11,7 @@
# subject :string(255) not null
# body :text
# email_state :integer default(0), not null
# private :boolean
# private :boolean default(FALSE)
# created_at :datetime
#
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html

View file

@ -1,18 +1,3 @@
# == Schema Information
#
# Table name: pages
#
# id :integer not null, primary key
# title :string(255)
# body :text
# permalink :string(255)
# lock_version :integer default(0)
# updated_by :integer
# redirect :integer
# created_at :datetime
# updated_at :datetime
#
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
one:
@ -24,3 +9,20 @@ two:
title: MyString
body: MyText
permalink: MyString
# == Schema Information
#
# Table name: pages
#
# id :integer not null, primary key
# title :string(255)
# body :text
# permalink :string(255)
# lock_version :integer default(0)
# updated_by :integer
# redirect :integer
# parent_id :integer
# created_at :datetime
# updated_at :datetime
#

View file

@ -1,22 +1,3 @@
# == Schema Information
#
# Table name: suppliers
#
# id :integer(4) not null, primary key
# name :string(255) not null
# address :string(255) not null
# phone :string(255) not null
# phone2 :string(255)
# fax :string(255)
# email :string(255)
# url :string(255)
# delivery_days :string(255)
# note :string(255)
# created_on :datetime
# updated_on :datetime
# lists :string(255)
#
# == Schema Information
<<<<<<< HEAD:test/fixtures/suppliers.yml
=======
@ -58,3 +39,28 @@ terra:
hesitate to ask for it.
min_order_quantity: 80,-€ (gross)
# == Schema Information
#
# Table name: suppliers
#
# id :integer(4) not null, primary key
# name :string(255) not null
# address :string(255) not null
# phone :string(255) not null
# phone2 :string(255)
# fax :string(255)
# email :string(255)
# url :string(255)
# delivery_days :string(255)
# note :string(255)
# created_on :datetime
# updated_on :datetime
# lists :string(255)
# bnn_sync :boolean(1) default(FALSE)
# bnn_host :string(255)
# bnn_user :string(255)
# bnn_password :string(255)
#

View file

@ -1,3 +1,5 @@
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
# == Schema Information
#
# Table name: tasks
@ -6,12 +8,13 @@
# name :string(255) default(""), not null
# description :string(255)
# due_date :date
# done :boolean
# done :boolean default(FALSE)
# workgroup_id :integer
# assigned :boolean
# assigned :boolean default(FALSE)
# created_on :datetime not null
# updated_on :datetime not null
# required_users :integer default(1)
# weekly :boolean
# duration :integer
#
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html

View file

@ -1,13 +1,3 @@
# == Schema Information
#
# Table name: assignments
#
# id :integer not null, primary key
# user_id :integer default(0), not null
# task_id :integer default(0), not null
# accepted :boolean
#
require File.dirname(__FILE__) + '/../test_helper'
class AssignmentTest < Test::Unit::TestCase
@ -18,3 +8,14 @@ class AssignmentTest < Test::Unit::TestCase
assert true
end
end
# == Schema Information
#
# Table name: assignments
#
# id :integer not null, primary key
# user_id :integer default(0), not null
# task_id :integer default(0), not null
# accepted :boolean default(FALSE)
#

View file

@ -1,30 +1,3 @@
# == Schema Information
#
# Table name: groups
#
# id :integer not null, primary key
# type :string(255) default(""), not null
# name :string(255) default(""), not null
# description :string(255)
# account_balance :decimal(, ) default(0.0), not null
# account_updated :datetime
# created_on :datetime not null
# role_admin :boolean not null
# role_suppliers :boolean not null
# role_article_meta :boolean not null
# role_finance :boolean not null
# role_orders :boolean not null
# weekly_task :boolean
# weekday :integer
# task_name :string(255)
# task_description :string(255)
# task_required_users :integer default(1)
# deleted_at :datetime
# contact_person :string(255)
# contact_phone :string(255)
# contact_address :string(255)
#
require File.dirname(__FILE__) + '/../test_helper'
class GroupTest < Test::Unit::TestCase
@ -35,3 +8,32 @@ class GroupTest < Test::Unit::TestCase
assert true
end
end
# == Schema Information
#
# Table name: groups
#
# id :integer not null, primary key
# type :string(255) default(""), not null
# name :string(255) default(""), not null
# description :string(255)
# account_balance :decimal(8, 2) default(0.0), not null
# account_updated :datetime
# created_on :datetime not null
# role_admin :boolean default(FALSE), not null
# role_suppliers :boolean default(FALSE), not null
# role_article_meta :boolean default(FALSE), not null
# role_finance :boolean default(FALSE), not null
# role_orders :boolean default(FALSE), not null
# weekly_task :boolean default(FALSE)
# weekday :integer
# task_name :string(255)
# task_description :string(255)
# task_required_users :integer default(1)
# deleted_at :datetime
# contact_person :string(255)
# contact_phone :string(255)
# contact_address :string(255)
# stats :text
#

View file

@ -1,3 +1,12 @@
require 'test_helper'
class PageTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end
# == Schema Information
#
# Table name: pages
@ -9,15 +18,8 @@
# lock_version :integer default(0)
# updated_by :integer
# redirect :integer
# parent_id :integer
# created_at :datetime
# updated_at :datetime
#
require 'test_helper'
class PageTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end

View file

@ -1,5 +1,15 @@
require File.dirname(__FILE__) + '/../test_helper'
class SharedSupplierTest < Test::Unit::TestCase
fixtures :shared_suppliers
# Replace this with your real tests.
def test_truth
assert true
end
end
# == Schema Information
# Schema version: 20090317175355
#
# Table name: suppliers
#
@ -16,15 +26,9 @@
# created_on :datetime
# updated_on :datetime
# lists :string(255)
# bnn_sync :boolean(1) default(FALSE)
# bnn_host :string(255)
# bnn_user :string(255)
# bnn_password :string(255)
#
require File.dirname(__FILE__) + '/../test_helper'
class SharedSupplierTest < Test::Unit::TestCase
fixtures :shared_suppliers
# Replace this with your real tests.
def test_truth
assert true
end
end

View file

@ -1,3 +1,12 @@
require 'test_helper'
class StockArticleTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end
# == Schema Information
#
# Table name: articles
@ -12,23 +21,15 @@
# manufacturer :string(255)
# origin :string(255)
# shared_updated_on :datetime
# price :decimal(, )
# price :decimal(8, 2)
# tax :float
# deposit :decimal(, ) default(0.0)
# deposit :decimal(8, 2) default(0.0)
# unit_quantity :integer default(1), not null
# order_number :string(255)
# created_at :datetime
# updated_at :datetime
# quantity :integer default(0)
# deleted_at :datetime
# type :string(255)
# quantity :integer default(0)
#
require 'test_helper'
class StockArticleTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end

View file

@ -1,19 +1,3 @@
# == Schema Information
#
# Table name: tasks
#
# id :integer not null, primary key
# name :string(255) default(""), not null
# description :string(255)
# due_date :date
# done :boolean
# workgroup_id :integer
# assigned :boolean
# created_on :datetime not null
# updated_on :datetime not null
# required_users :integer default(1)
#
require File.dirname(__FILE__) + '/../test_helper'
class TaskTest < Test::Unit::TestCase
@ -24,3 +8,22 @@ class TaskTest < Test::Unit::TestCase
assert true
end
end
# == Schema Information
#
# Table name: tasks
#
# id :integer not null, primary key
# name :string(255) default(""), not null
# description :string(255)
# due_date :date
# done :boolean default(FALSE)
# workgroup_id :integer
# assigned :boolean default(FALSE)
# created_on :datetime not null
# updated_on :datetime not null
# required_users :integer default(1)
# weekly :boolean
# duration :integer
#

View file

@ -1,30 +1,3 @@
# == Schema Information
#
# Table name: groups
#
# id :integer not null, primary key
# type :string(255) default(""), not null
# name :string(255) default(""), not null
# description :string(255)
# account_balance :decimal(, ) default(0.0), not null
# account_updated :datetime
# created_on :datetime not null
# role_admin :boolean not null
# role_suppliers :boolean not null
# role_article_meta :boolean not null
# role_finance :boolean not null
# role_orders :boolean not null
# weekly_task :boolean
# weekday :integer
# task_name :string(255)
# task_description :string(255)
# task_required_users :integer default(1)
# deleted_at :datetime
# contact_person :string(255)
# contact_phone :string(255)
# contact_address :string(255)
#
require 'test_helper'
class WorkgroupTest < ActiveSupport::TestCase
@ -33,3 +6,32 @@ class WorkgroupTest < ActiveSupport::TestCase
assert true
end
end
# == Schema Information
#
# Table name: groups
#
# id :integer not null, primary key
# type :string(255) default(""), not null
# name :string(255) default(""), not null
# description :string(255)
# account_balance :decimal(8, 2) default(0.0), not null
# account_updated :datetime
# created_on :datetime not null
# role_admin :boolean default(FALSE), not null
# role_suppliers :boolean default(FALSE), not null
# role_article_meta :boolean default(FALSE), not null
# role_finance :boolean default(FALSE), not null
# role_orders :boolean default(FALSE), not null
# weekly_task :boolean default(FALSE)
# weekday :integer
# task_name :string(255)
# task_description :string(255)
# task_required_users :integer default(1)
# deleted_at :datetime
# contact_person :string(255)
# contact_phone :string(255)
# contact_address :string(255)
# stats :text
#