data-draft

Updated almost 7 years ago by rene paulokat
== User
has_many :owned_projects, class_name: 'Project', as: :owner
has_many :scores
has_many :projects, through: :teamplayer
* email
* nick
* count_specs
* count_succeeded 
* count_failures
* overall_duration
* count_of_scores

== Project
has_many :user, through: :teamplayer
belongs_to :owner, class_name: 'User'
has_many :scores
* api_key
* count_specs
* count_succeeded 
* count_failures
* overall_duration
* count_of_scores

== Teamplayer
belongs_to :project
belongs_to :user

== Score
belongs_to :user, counter_cache: :count_of_scores
belongs_to :project, counter_cache: :count_of_scores
* duration (float, scale: 2)
* specs (int)
* succeeded (int)
* failed (int)
* pending (int)

- possible scopes:
in User and Project - (as concerns):
scope :today, :this_week, :this_month, :start_date, :end_date
scope :max_duration, :min_duration
scope :max_success, :min_success
scope :max_scopes, :min_scopes
scope :max_failures, :min_failures
scope :max_pending, :min_pending
Revisions

comments powered by Disqus