40 lines
1.3 KiB
Ruby
40 lines
1.3 KiB
Ruby
# == Schema Information
|
|
#
|
|
# Table name: action_pipelines
|
|
#
|
|
# id :integer not null, primary key
|
|
# project_id :integer
|
|
# user_id :integer
|
|
# pipeline_name :string(255)
|
|
# pipeline_status :string(255)
|
|
# description :string(255)
|
|
# file_name :string(255)
|
|
# is_graphic_design :boolean default("0")
|
|
# repo_name :string(255)
|
|
# repo_identifier :string(255)
|
|
# repo_owner :string(255)
|
|
# branch :string(255)
|
|
# event :string(255)
|
|
# sha :string(255)
|
|
# json :text(65535)
|
|
# yaml :text(65535)
|
|
# disable :boolean default("0")
|
|
# created_at :datetime not null
|
|
# updated_at :datetime not null
|
|
#
|
|
# Indexes
|
|
#
|
|
# index_action_pipelines_on_project_id (project_id)
|
|
# index_action_pipelines_on_user_id (user_id)
|
|
#
|
|
|
|
class Action::Pipeline < ApplicationRecord
|
|
self.table_name = 'action_pipelines'
|
|
belongs_to :user, optional: true
|
|
belongs_to :project
|
|
|
|
validates :name, presence: { message: "不能为空" }
|
|
validates :json, length: { maximum: 65535, too_long: "不能超过65535个字符"}
|
|
validates :yaml, length: { maximum: 65535, too_long: "不能超过65535个字符"}
|
|
end
|