2023-06-13 15:30:16 +08:00
|
|
|
# == Schema Information
|
|
|
|
|
#
|
|
|
|
|
# Table name: commit_logs
|
|
|
|
|
#
|
|
|
|
|
# id :integer not null, primary key
|
|
|
|
|
# user_id :integer
|
|
|
|
|
# project_id :integer
|
|
|
|
|
# repository_id :integer
|
|
|
|
|
# name :string(255)
|
|
|
|
|
# full_name :string(255)
|
|
|
|
|
# commit_id :string(255)
|
|
|
|
|
# ref :string(255)
|
|
|
|
|
# message :text(65535)
|
|
|
|
|
# created_at :datetime not null
|
|
|
|
|
# updated_at :datetime not null
|
|
|
|
|
#
|
|
|
|
|
# Indexes
|
|
|
|
|
#
|
|
|
|
|
# index_commit_logs_on_commit_id (commit_id)
|
|
|
|
|
# index_commit_logs_on_project_id (project_id)
|
|
|
|
|
# index_commit_logs_on_user_id (user_id)
|
|
|
|
|
#
|
|
|
|
|
|
2022-07-11 15:52:38 +08:00
|
|
|
class CommitLog < ApplicationRecord
|
|
|
|
|
belongs_to :user
|
|
|
|
|
belongs_to :project
|
2025-05-12 16:00:23 +08:00
|
|
|
# belongs_to :repository
|
2022-07-11 15:52:38 +08:00
|
|
|
|
2023-04-17 10:13:23 +08:00
|
|
|
has_many :project_trends, as: :trend, dependent: :destroy
|
|
|
|
|
|
2023-04-17 10:15:57 +08:00
|
|
|
def title
|
|
|
|
|
self.message
|
|
|
|
|
end
|
|
|
|
|
|
2022-07-11 15:52:38 +08:00
|
|
|
end
|