芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/qrafiqxcreativeagency.com/accounts/office/app/Models/Discussion.php
$mentionDiscussion * @property-read int|null $mention_discussion_count * @property-read \Illuminate\Database\Eloquent\Collection
$mentionUser * @property-read int|null $mention_user_count * @property-read \Illuminate\Database\Eloquent\Collection
$mentionDiscussion * @property-read \Illuminate\Database\Eloquent\Collection
$mentionUser * @mixin \Eloquent */ class Discussion extends BaseModel { use HasCompany; protected $guarded = ['id']; protected $casts = [ 'last_reply_at' => 'datetime', ]; public function user(): BelongsTo { return $this->belongsTo(User::class); } public function lastReplyBy(): BelongsTo { return $this->belongsTo(User::class, 'last_reply_by_id'); } public function replies(): HasMany { return $this->hasMany(DiscussionReply::class, 'discussion_id'); } public function category(): BelongsTo { return $this->belongsTo(DiscussionCategory::class, 'discussion_category_id'); } public function project(): BelongsTo { return $this->belongsTo(Project::class, 'project_id'); } public function files(): HasMany { return $this->hasMany(DiscussionFile::class, 'discussion_id'); } public function mentionUser(): BelongsToMany { return $this->belongsToMany(User::class, 'mention_users')->withoutGlobalScope(ActiveScope::class)->using(MentionUser::class); } public function mentionDiscussion(): HasMany { return $this->hasMany(MentionUser::class, 'discussion_id'); } }