新增:删除项目须同时删除所有的统计数据

This commit is contained in:
yystopf 2023-12-20 09:58:03 +08:00
parent 93ab86e363
commit 3fefc0d7c6
1 changed files with 1 additions and 0 deletions

View File

@ -136,6 +136,7 @@ class Project < ApplicationRecord
has_many :project_topic_ralates, dependent: :destroy
has_many :project_topics, through: :project_topic_ralates
has_many :commit_logs, dependent: :destroy
has_many :daily_project_statistics, dependent: :destroy
after_create :incre_user_statistic, :incre_platform_statistic
after_save :check_project_members
before_save :set_invite_code, :reset_unmember_followed, :set_recommend_and_is_pinned, :reset_cache_data