first commit
This commit is contained in:
commit
405df0a122
3083 changed files with 69203 additions and 0 deletions
126
dev/Models/PressRelease.php
Normal file
126
dev/Models/PressRelease.php
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class PressRelease
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $title
|
||||
* @property string $language
|
||||
* @property string $text
|
||||
* @property string|null $backlink_url
|
||||
* @property int $category_id
|
||||
* @property int $user_id
|
||||
* @property int|null $company_id
|
||||
* @property int|null $user_payment_id
|
||||
* @property int|null $payment
|
||||
* @property string|null $status
|
||||
* @property int|null $hits
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property string|null $slug
|
||||
* @property int $teaser_begin
|
||||
* @property int $teaser_end
|
||||
* @property int $no_export
|
||||
* @property string|null $keywords
|
||||
* @property Category $category
|
||||
* @property Company|null $company
|
||||
* @property SfGuardUser $sf_guard_user
|
||||
* @property Collection|Contact[] $contacts
|
||||
* @property Collection|PressReleaseImageOld[] $press_release_image_olds
|
||||
* @package App\Models
|
||||
* @property-read int|null $contacts_count
|
||||
* @property-read int|null $press_release_image_olds_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressRelease newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressRelease newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressRelease query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressRelease whereBacklinkUrl($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressRelease whereCategoryId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressRelease whereCompanyId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressRelease whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressRelease whereHits($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressRelease whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressRelease whereKeywords($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressRelease whereLanguage($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressRelease whereNoExport($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressRelease wherePayment($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressRelease whereSlug($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressRelease whereStatus($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressRelease whereTeaserBegin($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressRelease whereTeaserEnd($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressRelease whereText($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressRelease whereTitle($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressRelease whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressRelease whereUserId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressRelease whereUserPaymentId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class PressRelease extends Model
|
||||
{
|
||||
protected $table = 'press_release';
|
||||
|
||||
protected $casts = [
|
||||
'category_id' => 'int',
|
||||
'user_id' => 'int',
|
||||
'company_id' => 'int',
|
||||
'user_payment_id' => 'int',
|
||||
'payment' => 'int',
|
||||
'hits' => 'int',
|
||||
'teaser_begin' => 'int',
|
||||
'teaser_end' => 'int',
|
||||
'no_export' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'title',
|
||||
'language',
|
||||
'text',
|
||||
'backlink_url',
|
||||
'category_id',
|
||||
'user_id',
|
||||
'company_id',
|
||||
'user_payment_id',
|
||||
'payment',
|
||||
'status',
|
||||
'hits',
|
||||
'slug',
|
||||
'teaser_begin',
|
||||
'teaser_end',
|
||||
'no_export',
|
||||
'keywords'
|
||||
];
|
||||
|
||||
public function category()
|
||||
{
|
||||
return $this->belongsTo(Category::class);
|
||||
}
|
||||
|
||||
public function company()
|
||||
{
|
||||
return $this->belongsTo(Company::class);
|
||||
}
|
||||
|
||||
public function sf_guard_user()
|
||||
{
|
||||
return $this->belongsTo(SfGuardUser::class, 'user_id');
|
||||
}
|
||||
|
||||
public function contacts()
|
||||
{
|
||||
return $this->belongsToMany(Contact::class, 'press_release_contact');
|
||||
}
|
||||
|
||||
public function press_release_image_olds()
|
||||
{
|
||||
return $this->hasMany(PressReleaseImageOld::class);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue