for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of Gitamin.
*
* Copyright (C) 2015-2016 The Gitamin Team
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
# == Schema Information
#
# Table name: notes
# id :integer not null, primary key
# note :text
# noteable_type :string(255)
# author_id :integer
# created_at :datetime
# updated_at :datetime
# project_id :integer
# attachment :string(255)
# line_code :string(255)
# commit_id :string(255)
# noteable_id :integer
# system :boolean default(FALSE), not null
# st_diff :text
# updated_by_id :integer
# is_award :boolean
namespace Gitamin\Models;
use AltThree\Validator\ValidatingTrait;
use Gitamin\Presenters\NotePresenter;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use McCool\LaravelAutoPresenter\HasPresenter;
class Note extends Model implements HasPresenter
{
use SoftDeletes, ValidatingTrait;
/**
* The fillable properties.
* @var string[]
protected $fillable = [
'author_id',
'project_id',
'description',
'noteable_type',
'noteable_id',
'created_at',
'updated_at',
];
* The validation rules.
public $rules = [
'author_id' => 'int',
'project_id' => 'int',
'description' => 'required',
'noteable_type' => 'string|required',
'noteable_id' => 'int',
* Get the presenter class.
* @return string
public function getPresenterClass()
return NotePresenter::class;
}