Move github source to private server
This commit is contained in:
6
app/models/comment.rb
Normal file
6
app/models/comment.rb
Normal file
@@ -0,0 +1,6 @@
|
||||
class Comment < ApplicationRecord
|
||||
belongs_to :user
|
||||
belongs_to :task
|
||||
|
||||
validates :content, presence: true
|
||||
end
|
||||
@@ -4,6 +4,7 @@ class Task < ApplicationRecord
|
||||
belongs_to :creator, class_name: 'User'
|
||||
|
||||
has_many :task_activities, dependent: :destroy
|
||||
has_many :comments, dependent: :destroy
|
||||
|
||||
enum priority: {
|
||||
planning: 'planning',
|
||||
|
||||
@@ -7,6 +7,7 @@ class User < ApplicationRecord
|
||||
belongs_to :department, optional: true
|
||||
has_many :assigned_tasks, class_name: 'Task', foreign_key: 'assignee_id'
|
||||
has_many :created_tasks, class_name: 'Task', foreign_key: 'creator_id'
|
||||
has_many :comments, dependent: :destroy
|
||||
|
||||
enum role: { admin: 'admin', manager: 'manager', employee: 'employee' }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user