芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/public_html/design.pulsehost.co.uk/application/app/Models/Ticket.php
belongsTo('App\Models\User', 'ticket_creatorid', 'id'); } /** * relatioship business rules: * - the Ticket can have many Comments * - the Comment belongs to one Ticket * - other Comments can belong to other tables */ public function comments() { return $this->morphMany('App\Models\Comment', 'commentresource'); } /** * relatioship business rules: * - the Ticket can have many Attachments * - the Attachment belongs to one Ticket * - other Attachments can belong to other tables */ public function attachments() { return $this->morphMany('App\Models\Attachment', 'attachmentresource'); } /** * relatioship business rules: * - the Ticket can have many Tags * - the Tags belongs to one Ticket * - other tags can belong to other tables */ public function tags() { return $this->morphMany('App\Models\Tag', 'tagresource'); } /** * relatioship business rules: * - the Client can have many Ticket * - the Ticket belongs to one Client */ public function client() { return $this->belongsTo('App\Models\Client', 'ticket_clientid', 'client_id'); } /** * relatioship business rules: * - the Category can have many Tickets * - the Ticket belongs to one Category */ public function category() { return $this->belongsTo('App\Models\Category', 'ticket_categoryid', 'category_id'); } /** * relatioship business rules: * - the Project can have many Tickets * - the Ticket belongs to one Project */ public function project() { return $this->belongsTo('App\Models\Project', 'ticket_categoryid', 'project_id'); } /** * relatioship business rules: * - the Ticket can have many Replies * - the Reply belongs to one Ticket */ public function replies() { return $this->hasMany('App\Models\TicketReply', 'ticketreply_ticketid', 'ticket_id'); } }