Annotate models
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
1a9b2a47a1
commit
92deb451da
|
@ -15,7 +15,6 @@
|
|||
# milestone_id :integer
|
||||
# state :string(255)
|
||||
# iid :integer
|
||||
# attachment :string(255)
|
||||
#
|
||||
|
||||
require 'carrierwave/orm/activerecord'
|
||||
|
|
|
@ -1,3 +1,15 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: labels
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# title :string(255)
|
||||
# color :string(255)
|
||||
# project_id :integer
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
#
|
||||
|
||||
class Label < ActiveRecord::Base
|
||||
DEFAULT_COLOR = '#428BCA'
|
||||
|
||||
|
|
|
@ -1,3 +1,15 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: label_links
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# label_id :integer
|
||||
# target_id :integer
|
||||
# target_type :string(255)
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
#
|
||||
|
||||
class LabelLink < ActiveRecord::Base
|
||||
belongs_to :target, polymorphic: true
|
||||
belongs_to :label
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
# target_project_id :integer not null
|
||||
# iid :integer
|
||||
# description :text
|
||||
# position :integer default(0)
|
||||
#
|
||||
|
||||
require Rails.root.join("app/models/commit")
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Table name: merge_request_diffs
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# state :string(255) default("collected"), not null
|
||||
# state :string(255)
|
||||
# st_commits :text
|
||||
# st_diffs :text
|
||||
# merge_request_id :integer not null
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
# visibility_level :integer default(0), not null
|
||||
# archived :boolean default(FALSE), not null
|
||||
# import_status :string(255)
|
||||
# star_count :integer
|
||||
# repository_size :float default(0.0)
|
||||
# star_count :integer default(0), not null
|
||||
#
|
||||
|
||||
class Project < ActiveRecord::Base
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: services
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# type :string(255)
|
||||
# title :string(255)
|
||||
# token :string(255)
|
||||
# project_id :integer not null
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# active :boolean default(FALSE), not null
|
||||
# project_url :string(255)
|
||||
# subdomain :string(255)
|
||||
# room :string(255)
|
||||
# recipients :text
|
||||
# api_key :string(255)
|
||||
#
|
||||
|
||||
# Base class for CI services
|
||||
# List methods you need to implement to get your CI service
|
||||
# working with GitLab Merge Requests
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
#
|
||||
# Table name: users_star_projects
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# starrer_id :integer not null
|
||||
# project_id :integer not null
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# id :integer not null, primary key
|
||||
# project_id :integer not null
|
||||
# user_id :integer not null
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
#
|
||||
|
||||
class UsersStarProject < ActiveRecord::Base
|
||||
|
|
|
@ -1,3 +1,15 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: label_links
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# label_id :integer
|
||||
# target_id :integer
|
||||
# target_type :string(255)
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
#
|
||||
|
||||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
|
|
|
@ -1,3 +1,15 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: labels
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# title :string(255)
|
||||
# color :string(255)
|
||||
# project_id :integer
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
#
|
||||
|
||||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: merge_requests
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# target_branch :string(255) not null
|
||||
# source_branch :string(255) not null
|
||||
# source_project_id :integer not null
|
||||
# author_id :integer
|
||||
# assignee_id :integer
|
||||
# title :string(255)
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# milestone_id :integer
|
||||
# state :string(255)
|
||||
# merge_status :string(255)
|
||||
# target_project_id :integer not null
|
||||
# iid :integer
|
||||
# description :text
|
||||
# position :integer default(0)
|
||||
#
|
||||
|
||||
FactoryGirl.define do
|
||||
factory :merge_request do
|
||||
title
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: notes
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# note :text
|
||||
# noteable_type :string(255)
|
||||
# author_id :integer
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# project_id :integer
|
||||
# attachment :string(255)
|
||||
# line_code :string(255)
|
||||
# commit_id :string(255)
|
||||
# noteable_id :integer
|
||||
# system :boolean default(FALSE), not null
|
||||
# st_diff :text
|
||||
#
|
||||
|
||||
require_relative '../support/repo_helpers'
|
||||
|
||||
FactoryGirl.define do
|
||||
|
|
|
@ -1,3 +1,31 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: projects
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# name :string(255)
|
||||
# path :string(255)
|
||||
# description :text
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
# creator_id :integer
|
||||
# issues_enabled :boolean default(TRUE), not null
|
||||
# wall_enabled :boolean default(TRUE), not null
|
||||
# merge_requests_enabled :boolean default(TRUE), not null
|
||||
# wiki_enabled :boolean default(TRUE), not null
|
||||
# namespace_id :integer
|
||||
# issues_tracker :string(255) default("gitlab"), not null
|
||||
# issues_tracker_id :string(255)
|
||||
# snippets_enabled :boolean default(TRUE), not null
|
||||
# last_activity_at :datetime
|
||||
# import_url :string(255)
|
||||
# visibility_level :integer default(0), not null
|
||||
# archived :boolean default(FALSE), not null
|
||||
# import_status :string(255)
|
||||
# repository_size :float default(0.0)
|
||||
# star_count :integer default(0), not null
|
||||
#
|
||||
|
||||
FactoryGirl.define do
|
||||
factory :empty_project, class: 'Project' do
|
||||
sequence(:name) { |n| "project#{n}" }
|
||||
|
|
|
@ -1,3 +1,15 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: label_links
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# label_id :integer
|
||||
# target_id :integer
|
||||
# target_type :string(255)
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
#
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe LabelLink do
|
||||
|
|
|
@ -1,3 +1,15 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: labels
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# title :string(255)
|
||||
# color :string(255)
|
||||
# project_id :integer
|
||||
# created_at :datetime
|
||||
# updated_at :datetime
|
||||
#
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe Label do
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
# target_project_id :integer not null
|
||||
# iid :integer
|
||||
# description :text
|
||||
# position :integer default(0)
|
||||
#
|
||||
|
||||
require 'spec_helper'
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
# visibility_level :integer default(0), not null
|
||||
# archived :boolean default(FALSE), not null
|
||||
# import_status :string(255)
|
||||
# repository_size :float default(0.0)
|
||||
# star_count :integer default(0), not null
|
||||
#
|
||||
|
||||
require 'spec_helper'
|
||||
|
|
Loading…
Reference in New Issue