last changes since 6-2023
This commit is contained in:
parent
561c5875a7
commit
c1c613a4b9
53 changed files with 1351 additions and 93 deletions
|
|
@ -222,6 +222,7 @@ class Booking extends Model
|
|||
//'airline_id' => 'int',
|
||||
'refund' => 'int',
|
||||
'xx_tkt' => 'int',
|
||||
'insurance_offer' => 'int',
|
||||
'is_rail_fly' => 'bool',
|
||||
'comfort' => 'bool',
|
||||
'airline_ids' => 'array',
|
||||
|
|
@ -277,6 +278,7 @@ class Booking extends Model
|
|||
'final_payment',
|
||||
'final_payment_date',
|
||||
'travelagenda_id',
|
||||
'insurance_offer',
|
||||
'paying_out',
|
||||
'paying_out_status',
|
||||
//'airline_id',
|
||||
|
|
@ -313,6 +315,12 @@ class Booking extends Model
|
|||
2 => 'erledigt',
|
||||
];
|
||||
|
||||
public static $insurance_offer_types = [
|
||||
0 => '-',
|
||||
1 => 'Nein, keine Reiseversicherung gewünscht',
|
||||
2 => 'Ja, ich wünsche ein Reiseversicherungsangebot'
|
||||
];
|
||||
|
||||
public static $paying_out_status_types = [
|
||||
0 => '-',
|
||||
1 => 'offen',
|
||||
|
|
@ -921,6 +929,10 @@ class Booking extends Model
|
|||
return isset(self::$paying_out_types[$this->paying_out]) ? self::$paying_out_types[$this->paying_out] : '-';
|
||||
}
|
||||
|
||||
public function getInsuranceOfferType(){
|
||||
return isset(self::$insurance_offer_types[$this->insurance_offer]) ? self::$insurance_offer_types[$this->insurance_offer] : '-';
|
||||
}
|
||||
|
||||
public function getPayingOutStatusType(){
|
||||
return isset(self::$paying_out_status_types[$this->paying_out_status]) ? self::$paying_out_status_types[$this->paying_out_status] : '-';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,19 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Cviebrock\EloquentSluggable\Sluggable;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* App\Models\Page
|
||||
*
|
||||
* Class Page
|
||||
*
|
||||
* @property int $id
|
||||
* @property int|null $owner
|
||||
* @property string|null $model
|
||||
|
|
@ -20,6 +27,8 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @property int|null $show_in_navi
|
||||
* @property int|null $order
|
||||
* @property string|null $title
|
||||
* @property string|null $title_short
|
||||
* @property string|null $before_title
|
||||
* @property string|null $pagetitle
|
||||
* @property string|null $description
|
||||
* @property string|null $keywords
|
||||
|
|
@ -29,8 +38,8 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @property int|null $OLD_CatalogID
|
||||
* @property int|null $OLD_OwnerID
|
||||
* @property int|null $buma_gjr
|
||||
* @property string|null $date
|
||||
* @property int $price-tags
|
||||
* @property Carbon $date
|
||||
* @property bool $price-tags
|
||||
* @property string|null $text_right
|
||||
* @property string|null $keyword
|
||||
* @property string|null $canonical_url
|
||||
|
|
@ -41,71 +50,169 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @property int|null $tree_root
|
||||
* @property int|null $parent_id
|
||||
* @property string|null $real_url_path
|
||||
* @property int|null $travel_guide_content_id
|
||||
* @property string|null $box_body
|
||||
* @property string|null $box_image_url
|
||||
* @property string|null $box_star
|
||||
* @property string|null $box_discount
|
||||
* @property string|null $cms_settings
|
||||
* @property int|null $fewo_lodging
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereBoxBody($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereBoxDiscount($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereBoxImageUrl($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereBoxStar($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereBumaDestination($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereBumaGjr($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereCanonicalUrl($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereCatalogId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereCatalogIndex($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereCmsSettings($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereContent($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereContentNew($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereCountryId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereDescription($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereFewoLodging($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereKeyword($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereKeywords($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereLft($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereLvl($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereModel($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereOLDCatalogID($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereOLDOwnerID($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereOrder($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereOwner($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereOwnerSecond($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page wherePagetitle($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereParentId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page wherePriceTags($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereRealUrlPath($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereRgt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereShowInNavi($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereSlug($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereStatus($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereTemplate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereTextRight($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereTitle($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereTravelProgram($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereTreeRoot($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
* @property int|null $travel_guide_content_id
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereTravelGuideContentId($value)
|
||||
* @property string|null $title_short
|
||||
* @property string|null $before_title
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereBeforeTitle($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereTitleShort($value)
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
*
|
||||
* @property Page|null $page
|
||||
* @property TravelCountry|null $travel_country
|
||||
* @property TravelGuide|null $travel_guide
|
||||
* @property Collection|Page[] $pages
|
||||
* @property Collection|Redirect[] $redirects
|
||||
* @property Collection|TravelCountry[] $travel_countries
|
||||
* @property Collection|TravelProgram[] $travel_program_content
|
||||
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class Page extends Model
|
||||
{
|
||||
protected $connection = 'mysql_stern';
|
||||
use Sluggable;
|
||||
|
||||
protected $table = 'page';
|
||||
protected $connection = 'mysql_stern';
|
||||
protected $table = 'page';
|
||||
|
||||
|
||||
protected $casts = [
|
||||
'owner' => 'int',
|
||||
'lvl' => 'int',
|
||||
'owner_second' => 'int',
|
||||
'catalog_id' => 'int',
|
||||
'catalog_index' => 'int',
|
||||
'travel_program' => 'int',
|
||||
'status' => 'int',
|
||||
'show_in_navi' => 'int',
|
||||
'order' => 'int',
|
||||
'OLD_CatalogID' => 'int',
|
||||
'OLD_OwnerID' => 'int',
|
||||
'buma_gjr' => 'int',
|
||||
'price-tags' => 'bool',
|
||||
'country_id' => 'int',
|
||||
'lft' => 'int',
|
||||
'rgt' => 'int',
|
||||
'tree_root' => 'int',
|
||||
'parent_id' => 'int',
|
||||
'travel_guide_content_id' => 'int',
|
||||
'fewo_lodging' => 'int'
|
||||
];
|
||||
|
||||
protected $dates = [
|
||||
'date'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'owner',
|
||||
'model',
|
||||
'lvl',
|
||||
'owner_second',
|
||||
'catalog_id',
|
||||
'catalog_index',
|
||||
'slug',
|
||||
'travel_program',
|
||||
'status',
|
||||
'show_in_navi',
|
||||
'order',
|
||||
'title',
|
||||
'title_short',
|
||||
'before_title',
|
||||
'pagetitle',
|
||||
'description',
|
||||
'keywords',
|
||||
'content',
|
||||
'content_new',
|
||||
'buma_destination',
|
||||
'OLD_CatalogID',
|
||||
'OLD_OwnerID',
|
||||
'buma_gjr',
|
||||
'date',
|
||||
'price-tags',
|
||||
'text_right',
|
||||
'keyword',
|
||||
'canonical_url',
|
||||
'country_id',
|
||||
'template',
|
||||
'lft',
|
||||
'rgt',
|
||||
'tree_root',
|
||||
'parent_id',
|
||||
'real_url_path',
|
||||
'travel_guide_content_id',
|
||||
'box_body',
|
||||
'box_image_url',
|
||||
'box_star',
|
||||
'box_discount',
|
||||
'cms_settings',
|
||||
'fewo_lodging'
|
||||
];
|
||||
|
||||
public function sluggable()
|
||||
{
|
||||
return [
|
||||
'slug' => [
|
||||
'source' => 'title'
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
public function page()
|
||||
{
|
||||
return $this->belongsTo(Page::class, 'tree_root');
|
||||
}
|
||||
|
||||
public function fewo_lodging()
|
||||
{
|
||||
return $this->belongsTo(FewoLodging::class, 'fewo_lodging');
|
||||
}
|
||||
|
||||
public function travel_country()
|
||||
{
|
||||
return $this->belongsTo(TravelCountry::class, 'country_id');
|
||||
}
|
||||
|
||||
public function travel_guide()
|
||||
{
|
||||
return $this->belongsTo(TravelGuide::class, 'travel_guide_content_id');
|
||||
}
|
||||
|
||||
public function pages()
|
||||
{
|
||||
return $this->hasMany(Page::class, 'tree_root');
|
||||
}
|
||||
|
||||
public function redirects()
|
||||
{
|
||||
return $this->hasMany(Redirect::class);
|
||||
}
|
||||
|
||||
public function travel_countries()
|
||||
{
|
||||
return $this->hasMany(TravelCountry::class, 'feedback_page_id');
|
||||
}
|
||||
|
||||
public function child_pages()
|
||||
{
|
||||
return $this->hasMany(Page::class, 'owner');
|
||||
}
|
||||
|
||||
public function parent_page()
|
||||
{
|
||||
return $this->belongsTo(Page::class, 'parent_id');
|
||||
}
|
||||
|
||||
public function travel_program_content()
|
||||
{
|
||||
return $this->belongsTo(TravelProgram::class, 'travel_program');
|
||||
}
|
||||
|
||||
|
||||
public function getContentNew()
|
||||
{
|
||||
return $this->content_new ? $this->content_new : $this->content;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue