first commit
This commit is contained in:
commit
405df0a122
3083 changed files with 69203 additions and 0 deletions
46
dev/Models/ApiUser.php
Normal file
46
dev/Models/ApiUser.php
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class ApiUser
|
||||
*
|
||||
* @property int $id
|
||||
* @property int|null $user_id
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property SfGuardUser|null $sf_guard_user
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ApiUser newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ApiUser newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ApiUser query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ApiUser whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ApiUser whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ApiUser whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ApiUser whereUserId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class ApiUser extends Model
|
||||
{
|
||||
protected $table = 'api_user';
|
||||
|
||||
protected $casts = [
|
||||
'user_id' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'user_id'
|
||||
];
|
||||
|
||||
public function sf_guard_user()
|
||||
{
|
||||
return $this->belongsTo(SfGuardUser::class, 'user_id');
|
||||
}
|
||||
}
|
||||
35
dev/Models/Blacklist.php
Normal file
35
dev/Models/Blacklist.php
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class Blacklist
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $title
|
||||
* @property string $content
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Blacklist newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Blacklist newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Blacklist query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Blacklist whereContent($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Blacklist whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Blacklist whereTitle($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Blacklist extends Model
|
||||
{
|
||||
protected $table = 'blacklist';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'title',
|
||||
'content'
|
||||
];
|
||||
}
|
||||
55
dev/Models/Category.php
Normal file
55
dev/Models/Category.php
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class Category
|
||||
*
|
||||
* @property int $id
|
||||
* @property Collection|FooterCode[] $footer_codes
|
||||
* @property Collection|CategoryTranslation[] $category_translations
|
||||
* @property Collection|PressRelease[] $press_releases
|
||||
* @property Collection|PromotionLink[] $promotion_links
|
||||
* @package App\Models
|
||||
* @property-read int|null $category_translations_count
|
||||
* @property-read int|null $footer_codes_count
|
||||
* @property-read int|null $press_releases_count
|
||||
* @property-read int|null $promotion_links_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Category newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Category newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Category query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Category whereId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Category extends Model
|
||||
{
|
||||
protected $table = 'category';
|
||||
public $timestamps = false;
|
||||
|
||||
public function footer_codes()
|
||||
{
|
||||
return $this->belongsToMany(FooterCode::class);
|
||||
}
|
||||
|
||||
public function category_translations()
|
||||
{
|
||||
return $this->hasMany(CategoryTranslation::class, 'id');
|
||||
}
|
||||
|
||||
public function press_releases()
|
||||
{
|
||||
return $this->hasMany(PressRelease::class);
|
||||
}
|
||||
|
||||
public function promotion_links()
|
||||
{
|
||||
return $this->belongsToMany(PromotionLink::class, 'promotion_link_category');
|
||||
}
|
||||
}
|
||||
51
dev/Models/CategoryFooterCode.php
Normal file
51
dev/Models/CategoryFooterCode.php
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class CategoryFooterCode
|
||||
*
|
||||
* @property int $footer_code_id
|
||||
* @property int $category_id
|
||||
* @property Category $category
|
||||
* @property FooterCode $footer_code
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|CategoryFooterCode newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|CategoryFooterCode newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|CategoryFooterCode query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|CategoryFooterCode whereCategoryId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|CategoryFooterCode whereFooterCodeId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class CategoryFooterCode extends Model
|
||||
{
|
||||
protected $table = 'category_footer_code';
|
||||
public $incrementing = false;
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'footer_code_id' => 'int',
|
||||
'category_id' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'footer_code_id',
|
||||
'category_id'
|
||||
];
|
||||
|
||||
public function category()
|
||||
{
|
||||
return $this->belongsTo(Category::class);
|
||||
}
|
||||
|
||||
public function footer_code()
|
||||
{
|
||||
return $this->belongsTo(FooterCode::class);
|
||||
}
|
||||
}
|
||||
50
dev/Models/CategoryTranslation.php
Normal file
50
dev/Models/CategoryTranslation.php
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class CategoryTranslation
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property string|null $description
|
||||
* @property string $lang
|
||||
* @property string|null $slug
|
||||
* @property Category $category
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|CategoryTranslation newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|CategoryTranslation newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|CategoryTranslation query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|CategoryTranslation whereDescription($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|CategoryTranslation whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|CategoryTranslation whereLang($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|CategoryTranslation whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|CategoryTranslation whereSlug($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class CategoryTranslation extends Model
|
||||
{
|
||||
protected $table = 'category_translation';
|
||||
public $incrementing = false;
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'id' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'description'
|
||||
];
|
||||
|
||||
public function category()
|
||||
{
|
||||
return $this->belongsTo(Category::class, 'id');
|
||||
}
|
||||
}
|
||||
137
dev/Models/Company.php
Normal file
137
dev/Models/Company.php
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class Company
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property string $address
|
||||
* @property int $country_id
|
||||
* @property string $phone
|
||||
* @property string|null $fax
|
||||
* @property string $email
|
||||
* @property string $website
|
||||
* @property string|null $logo
|
||||
* @property string $ctype
|
||||
* @property string|null $login
|
||||
* @property string|null $password
|
||||
* @property int|null $is_active
|
||||
* @property int|null $user_id
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property string|null $slug
|
||||
* @property int $disable_footer_code
|
||||
* @property Country $country
|
||||
* @property SfGuardUser|null $sf_guard_user
|
||||
* @property CompanyUser $company_user
|
||||
* @property Collection|Contact[] $contacts
|
||||
* @property Collection|PressRelease[] $press_releases
|
||||
* @property ResponsibleCompanyUser $responsible_company_user
|
||||
* @property Collection|UserPaymentOption[] $user_payment_options
|
||||
* @package App\Models
|
||||
* @property-read int|null $contacts_count
|
||||
* @property-read int|null $press_releases_count
|
||||
* @property-read int|null $user_payment_options_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Company newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Company newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Company query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Company whereAddress($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Company whereCountryId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Company whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Company whereCtype($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Company whereDisableFooterCode($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Company whereEmail($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Company whereFax($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Company whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Company whereIsActive($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Company whereLogin($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Company whereLogo($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Company whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Company wherePassword($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Company wherePhone($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Company whereSlug($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Company whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Company whereUserId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Company whereWebsite($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Company extends Model
|
||||
{
|
||||
protected $table = 'company';
|
||||
|
||||
protected $casts = [
|
||||
'country_id' => 'int',
|
||||
'is_active' => 'int',
|
||||
'user_id' => 'int',
|
||||
'disable_footer_code' => 'int'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'password'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'address',
|
||||
'country_id',
|
||||
'phone',
|
||||
'fax',
|
||||
'email',
|
||||
'website',
|
||||
'logo',
|
||||
'ctype',
|
||||
'login',
|
||||
'password',
|
||||
'is_active',
|
||||
'user_id',
|
||||
'slug',
|
||||
'disable_footer_code'
|
||||
];
|
||||
|
||||
public function country()
|
||||
{
|
||||
return $this->belongsTo(Country::class);
|
||||
}
|
||||
|
||||
public function sf_guard_user()
|
||||
{
|
||||
return $this->belongsTo(SfGuardUser::class, 'user_id');
|
||||
}
|
||||
|
||||
public function company_user()
|
||||
{
|
||||
return $this->hasOne(CompanyUser::class);
|
||||
}
|
||||
|
||||
public function contacts()
|
||||
{
|
||||
return $this->hasMany(Contact::class);
|
||||
}
|
||||
|
||||
public function press_releases()
|
||||
{
|
||||
return $this->hasMany(PressRelease::class);
|
||||
}
|
||||
|
||||
public function responsible_company_user()
|
||||
{
|
||||
return $this->hasOne(ResponsibleCompanyUser::class);
|
||||
}
|
||||
|
||||
public function user_payment_options()
|
||||
{
|
||||
return $this->belongsToMany(UserPaymentOption::class, 'user_payment_option_company', 'company_id', 'payment_option_id')
|
||||
->withPivot('ip_address', 'is_active')
|
||||
->withTimestamps();
|
||||
}
|
||||
}
|
||||
51
dev/Models/CompanyUser.php
Normal file
51
dev/Models/CompanyUser.php
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class CompanyUser
|
||||
*
|
||||
* @property int $company_id
|
||||
* @property int $user_id
|
||||
* @property Company $company
|
||||
* @property SfGuardUser $sf_guard_user
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|CompanyUser newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|CompanyUser newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|CompanyUser query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|CompanyUser whereCompanyId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|CompanyUser whereUserId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class CompanyUser extends Model
|
||||
{
|
||||
protected $table = 'company_user';
|
||||
public $incrementing = false;
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'company_id' => 'int',
|
||||
'user_id' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'company_id',
|
||||
'user_id'
|
||||
];
|
||||
|
||||
public function company()
|
||||
{
|
||||
return $this->belongsTo(Company::class);
|
||||
}
|
||||
|
||||
public function sf_guard_user()
|
||||
{
|
||||
return $this->belongsTo(SfGuardUser::class, 'user_id');
|
||||
}
|
||||
}
|
||||
85
dev/Models/Contact.php
Normal file
85
dev/Models/Contact.php
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class Contact
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $company_id
|
||||
* @property int $salutation_id
|
||||
* @property string|null $title
|
||||
* @property string $first_name
|
||||
* @property string $last_name
|
||||
* @property string|null $responsibility
|
||||
* @property string|null $phone
|
||||
* @property string|null $fax
|
||||
* @property string $email
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property Company $company
|
||||
* @property Salutation $salutation
|
||||
* @property Collection|PressRelease[] $press_releases
|
||||
* @package App\Models
|
||||
* @property-read int|null $press_releases_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Contact newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Contact newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Contact query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Contact whereCompanyId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Contact whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Contact whereEmail($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Contact whereFax($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Contact whereFirstName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Contact whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Contact whereLastName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Contact wherePhone($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Contact whereResponsibility($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Contact whereSalutationId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Contact whereTitle($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Contact whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Contact extends Model
|
||||
{
|
||||
protected $table = 'contact';
|
||||
|
||||
protected $casts = [
|
||||
'company_id' => 'int',
|
||||
'salutation_id' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'company_id',
|
||||
'salutation_id',
|
||||
'title',
|
||||
'first_name',
|
||||
'last_name',
|
||||
'responsibility',
|
||||
'phone',
|
||||
'fax',
|
||||
'email'
|
||||
];
|
||||
|
||||
public function company()
|
||||
{
|
||||
return $this->belongsTo(Company::class);
|
||||
}
|
||||
|
||||
public function salutation()
|
||||
{
|
||||
return $this->belongsTo(Salutation::class);
|
||||
}
|
||||
|
||||
public function press_releases()
|
||||
{
|
||||
return $this->belongsToMany(PressRelease::class, 'press_release_contact');
|
||||
}
|
||||
}
|
||||
61
dev/Models/Country.php
Normal file
61
dev/Models/Country.php
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class Country
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property Collection|Company[] $companies
|
||||
* @property Collection|InvoiceBillingAddress[] $invoice_billing_addresses
|
||||
* @property Collection|SfGuardUserProfile[] $sf_guard_user_profiles
|
||||
* @property Collection|UserBillingAddress[] $user_billing_addresses
|
||||
* @package App\Models
|
||||
* @property-read int|null $companies_count
|
||||
* @property-read int|null $invoice_billing_addresses_count
|
||||
* @property-read int|null $sf_guard_user_profiles_count
|
||||
* @property-read int|null $user_billing_addresses_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Country newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Country newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Country query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Country whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Country whereName($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Country extends Model
|
||||
{
|
||||
protected $table = 'country';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $fillable = [
|
||||
'name'
|
||||
];
|
||||
|
||||
public function companies()
|
||||
{
|
||||
return $this->hasMany(Company::class);
|
||||
}
|
||||
|
||||
public function invoice_billing_addresses()
|
||||
{
|
||||
return $this->hasMany(InvoiceBillingAddress::class);
|
||||
}
|
||||
|
||||
public function sf_guard_user_profiles()
|
||||
{
|
||||
return $this->hasMany(SfGuardUserProfile::class);
|
||||
}
|
||||
|
||||
public function user_billing_addresses()
|
||||
{
|
||||
return $this->hasMany(UserBillingAddress::class);
|
||||
}
|
||||
}
|
||||
70
dev/Models/Coupon.php
Normal file
70
dev/Models/Coupon.php
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class Coupon
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $payment_option_id
|
||||
* @property string $code
|
||||
* @property float $value
|
||||
* @property int|null $on_redeem_expire
|
||||
* @property int|null $is_expired
|
||||
* @property Carbon|null $valid_until_date
|
||||
* @property PaymentOption $payment_option
|
||||
* @property Collection|UserPaymentOption[] $user_payment_options
|
||||
* @package App\Models
|
||||
* @property-read int|null $user_payment_options_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Coupon newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Coupon newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Coupon query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Coupon whereCode($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Coupon whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Coupon whereIsExpired($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Coupon whereOnRedeemExpire($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Coupon wherePaymentOptionId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Coupon whereValidUntilDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Coupon whereValue($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Coupon extends Model
|
||||
{
|
||||
protected $table = 'coupon';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'payment_option_id' => 'int',
|
||||
'value' => 'float',
|
||||
'on_redeem_expire' => 'int',
|
||||
'is_expired' => 'int',
|
||||
'valid_until_date' => 'datetime'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'payment_option_id',
|
||||
'code',
|
||||
'value',
|
||||
'on_redeem_expire',
|
||||
'is_expired',
|
||||
'valid_until_date'
|
||||
];
|
||||
|
||||
public function payment_option()
|
||||
{
|
||||
return $this->belongsTo(PaymentOption::class);
|
||||
}
|
||||
|
||||
public function user_payment_options()
|
||||
{
|
||||
return $this->hasMany(UserPaymentOption::class);
|
||||
}
|
||||
}
|
||||
53
dev/Models/FooterCode.php
Normal file
53
dev/Models/FooterCode.php
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class FooterCode
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $title
|
||||
* @property string|null $content
|
||||
* @property string|null $language
|
||||
* @property int $is_global
|
||||
* @property Collection|Category[] $categories
|
||||
* @package App\Models
|
||||
* @property-read int|null $categories_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FooterCode newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FooterCode newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FooterCode query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FooterCode whereContent($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FooterCode whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FooterCode whereIsGlobal($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FooterCode whereLanguage($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FooterCode whereTitle($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class FooterCode extends Model
|
||||
{
|
||||
protected $table = 'footer_code';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'is_global' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'title',
|
||||
'content',
|
||||
'language',
|
||||
'is_global'
|
||||
];
|
||||
|
||||
public function categories()
|
||||
{
|
||||
return $this->belongsToMany(Category::class);
|
||||
}
|
||||
}
|
||||
115
dev/Models/Invoice.php
Normal file
115
dev/Models/Invoice.php
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class Invoice
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $user_id
|
||||
* @property int $user_payment_id
|
||||
* @property int $billing_address_id
|
||||
* @property string $number
|
||||
* @property string $status
|
||||
* @property int|null $reminder_count
|
||||
* @property Carbon|null $next_reminder_date
|
||||
* @property float $amount
|
||||
* @property int|null $is_netto
|
||||
* @property int $is_media
|
||||
* @property Carbon $invoice_date
|
||||
* @property Carbon $due_date
|
||||
* @property Carbon|null $service_period_begin_date
|
||||
* @property Carbon|null $service_period_end_date
|
||||
* @property string|null $payment_method
|
||||
* @property Carbon|null $pay_date
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property InvoiceBillingAddress $invoice_billing_address
|
||||
* @property SfGuardUser $sf_guard_user
|
||||
* @property UserPayment $user_payment
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereAmount($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereBillingAddressId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereDueDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereInvoiceDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereIsMedia($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereIsNetto($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereNextReminderDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereNumber($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice wherePayDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice wherePaymentMethod($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereReminderCount($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereServicePeriodBeginDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereServicePeriodEndDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereStatus($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereUserId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Invoice whereUserPaymentId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Invoice extends Model
|
||||
{
|
||||
protected $table = 'invoice';
|
||||
|
||||
protected $casts = [
|
||||
'user_id' => 'int',
|
||||
'user_payment_id' => 'int',
|
||||
'billing_address_id' => 'int',
|
||||
'reminder_count' => 'int',
|
||||
'next_reminder_date' => 'datetime',
|
||||
'amount' => 'float',
|
||||
'is_netto' => 'int',
|
||||
'is_media' => 'int',
|
||||
'invoice_date' => 'datetime',
|
||||
'due_date' => 'datetime',
|
||||
'service_period_begin_date' => 'datetime',
|
||||
'service_period_end_date' => 'datetime',
|
||||
'pay_date' => 'datetime'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'user_payment_id',
|
||||
'billing_address_id',
|
||||
'number',
|
||||
'status',
|
||||
'reminder_count',
|
||||
'next_reminder_date',
|
||||
'amount',
|
||||
'is_netto',
|
||||
'is_media',
|
||||
'invoice_date',
|
||||
'due_date',
|
||||
'service_period_begin_date',
|
||||
'service_period_end_date',
|
||||
'payment_method',
|
||||
'pay_date'
|
||||
];
|
||||
|
||||
public function invoice_billing_address()
|
||||
{
|
||||
return $this->belongsTo(InvoiceBillingAddress::class, 'billing_address_id');
|
||||
}
|
||||
|
||||
public function sf_guard_user()
|
||||
{
|
||||
return $this->belongsTo(SfGuardUser::class, 'user_id');
|
||||
}
|
||||
|
||||
public function user_payment()
|
||||
{
|
||||
return $this->belongsTo(UserPayment::class);
|
||||
}
|
||||
}
|
||||
88
dev/Models/InvoiceBillingAddress.php
Normal file
88
dev/Models/InvoiceBillingAddress.php
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class InvoiceBillingAddress
|
||||
*
|
||||
* @property int $id
|
||||
* @property int|null $salutation_id
|
||||
* @property string|null $title
|
||||
* @property string $name
|
||||
* @property string|null $address
|
||||
* @property string|null $address1
|
||||
* @property string|null $address2
|
||||
* @property string|null $postal_code
|
||||
* @property string|null $city
|
||||
* @property int|null $country_id
|
||||
* @property string|null $country_name
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property Country|null $country
|
||||
* @property Salutation|null $salutation
|
||||
* @property Collection|Invoice[] $invoices
|
||||
* @package App\Models
|
||||
* @property-read int|null $invoices_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress whereAddress($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress whereAddress1($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress whereAddress2($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress whereCity($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress whereCountryId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress whereCountryName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress wherePostalCode($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress whereSalutationId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress whereTitle($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|InvoiceBillingAddress whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class InvoiceBillingAddress extends Model
|
||||
{
|
||||
protected $table = 'invoice_billing_address';
|
||||
|
||||
protected $casts = [
|
||||
'salutation_id' => 'int',
|
||||
'country_id' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'salutation_id',
|
||||
'title',
|
||||
'name',
|
||||
'address',
|
||||
'address1',
|
||||
'address2',
|
||||
'postal_code',
|
||||
'city',
|
||||
'country_id',
|
||||
'country_name'
|
||||
];
|
||||
|
||||
public function country()
|
||||
{
|
||||
return $this->belongsTo(Country::class);
|
||||
}
|
||||
|
||||
public function salutation()
|
||||
{
|
||||
return $this->belongsTo(Salutation::class);
|
||||
}
|
||||
|
||||
public function invoices()
|
||||
{
|
||||
return $this->hasMany(Invoice::class, 'billing_address_id');
|
||||
}
|
||||
}
|
||||
35
dev/Models/MigrationVersion.php
Normal file
35
dev/Models/MigrationVersion.php
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class MigrationVersion
|
||||
*
|
||||
* @property int|null $version
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|MigrationVersion newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|MigrationVersion newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|MigrationVersion query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|MigrationVersion whereVersion($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class MigrationVersion extends Model
|
||||
{
|
||||
protected $table = 'migration_version';
|
||||
public $incrementing = false;
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'version' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'version'
|
||||
];
|
||||
}
|
||||
83
dev/Models/NewsletterSubscription.php
Normal file
83
dev/Models/NewsletterSubscription.php
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class NewsletterSubscription
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $salutation_id
|
||||
* @property string $first_name
|
||||
* @property string $last_name
|
||||
* @property string $email
|
||||
* @property string|null $ip_address
|
||||
* @property int|null $is_active
|
||||
* @property Carbon|null $subscribe_date
|
||||
* @property Carbon|null $unsubscribe_date
|
||||
* @property int|null $user_id
|
||||
* @property string|null $validate
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property Salutation $salutation
|
||||
* @property SfGuardUser|null $sf_guard_user
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|NewsletterSubscription newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|NewsletterSubscription newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|NewsletterSubscription query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|NewsletterSubscription whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|NewsletterSubscription whereEmail($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|NewsletterSubscription whereFirstName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|NewsletterSubscription whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|NewsletterSubscription whereIpAddress($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|NewsletterSubscription whereIsActive($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|NewsletterSubscription whereLastName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|NewsletterSubscription whereSalutationId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|NewsletterSubscription whereSubscribeDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|NewsletterSubscription whereUnsubscribeDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|NewsletterSubscription whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|NewsletterSubscription whereUserId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|NewsletterSubscription whereValidate($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class NewsletterSubscription extends Model
|
||||
{
|
||||
protected $table = 'newsletter_subscription';
|
||||
|
||||
protected $casts = [
|
||||
'salutation_id' => 'int',
|
||||
'is_active' => 'int',
|
||||
'subscribe_date' => 'datetime',
|
||||
'unsubscribe_date' => 'datetime',
|
||||
'user_id' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'salutation_id',
|
||||
'first_name',
|
||||
'last_name',
|
||||
'email',
|
||||
'ip_address',
|
||||
'is_active',
|
||||
'subscribe_date',
|
||||
'unsubscribe_date',
|
||||
'user_id',
|
||||
'validate'
|
||||
];
|
||||
|
||||
public function salutation()
|
||||
{
|
||||
return $this->belongsTo(Salutation::class);
|
||||
}
|
||||
|
||||
public function sf_guard_user()
|
||||
{
|
||||
return $this->belongsTo(SfGuardUser::class, 'user_id');
|
||||
}
|
||||
}
|
||||
92
dev/Models/PaymentOption.php
Normal file
92
dev/Models/PaymentOption.php
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class PaymentOption
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $article_number
|
||||
* @property string $type
|
||||
* @property float $price
|
||||
* @property int|null $is_hidden
|
||||
* @property string|null $event_name_prefix
|
||||
* @property int|null $activate_on_first_payment
|
||||
* @property Collection|Coupon[] $coupons
|
||||
* @property PaymentOptionAccessGroup $payment_option_access_group
|
||||
* @property PaymentOptionExcludeGroup $payment_option_exclude_group
|
||||
* @property PaymentOptionReference $payment_option_reference
|
||||
* @property PaymentOptionTranslation $payment_option_translation
|
||||
* @property Collection|UserPaymentOption[] $user_payment_options
|
||||
* @package App\Models
|
||||
* @property-read int|null $coupons_count
|
||||
* @property-read int|null $user_payment_options_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOption newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOption newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOption query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOption whereActivateOnFirstPayment($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOption whereArticleNumber($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOption whereEventNamePrefix($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOption whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOption whereIsHidden($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOption wherePrice($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOption whereType($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class PaymentOption extends Model
|
||||
{
|
||||
protected $table = 'payment_option';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'price' => 'float',
|
||||
'is_hidden' => 'int',
|
||||
'activate_on_first_payment' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'article_number',
|
||||
'type',
|
||||
'price',
|
||||
'is_hidden',
|
||||
'event_name_prefix',
|
||||
'activate_on_first_payment'
|
||||
];
|
||||
|
||||
public function coupons()
|
||||
{
|
||||
return $this->hasMany(Coupon::class);
|
||||
}
|
||||
|
||||
public function payment_option_access_group()
|
||||
{
|
||||
return $this->hasOne(PaymentOptionAccessGroup::class);
|
||||
}
|
||||
|
||||
public function payment_option_exclude_group()
|
||||
{
|
||||
return $this->hasOne(PaymentOptionExcludeGroup::class);
|
||||
}
|
||||
|
||||
public function payment_option_reference()
|
||||
{
|
||||
return $this->hasOne(PaymentOptionReference::class, 'parent_payment_option_id');
|
||||
}
|
||||
|
||||
public function payment_option_translation()
|
||||
{
|
||||
return $this->hasOne(PaymentOptionTranslation::class, 'id');
|
||||
}
|
||||
|
||||
public function user_payment_options()
|
||||
{
|
||||
return $this->hasMany(UserPaymentOption::class);
|
||||
}
|
||||
}
|
||||
51
dev/Models/PaymentOptionAccessGroup.php
Normal file
51
dev/Models/PaymentOptionAccessGroup.php
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class PaymentOptionAccessGroup
|
||||
*
|
||||
* @property int $payment_option_id
|
||||
* @property int $group_id
|
||||
* @property SfGuardGroup $sf_guard_group
|
||||
* @property PaymentOption $payment_option
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOptionAccessGroup newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOptionAccessGroup newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOptionAccessGroup query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOptionAccessGroup whereGroupId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOptionAccessGroup wherePaymentOptionId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class PaymentOptionAccessGroup extends Model
|
||||
{
|
||||
protected $table = 'payment_option_access_group';
|
||||
public $incrementing = false;
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'payment_option_id' => 'int',
|
||||
'group_id' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'payment_option_id',
|
||||
'group_id'
|
||||
];
|
||||
|
||||
public function sf_guard_group()
|
||||
{
|
||||
return $this->belongsTo(SfGuardGroup::class, 'group_id');
|
||||
}
|
||||
|
||||
public function payment_option()
|
||||
{
|
||||
return $this->belongsTo(PaymentOption::class);
|
||||
}
|
||||
}
|
||||
51
dev/Models/PaymentOptionExcludeGroup.php
Normal file
51
dev/Models/PaymentOptionExcludeGroup.php
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class PaymentOptionExcludeGroup
|
||||
*
|
||||
* @property int $payment_option_id
|
||||
* @property int $group_id
|
||||
* @property SfGuardGroup $sf_guard_group
|
||||
* @property PaymentOption $payment_option
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOptionExcludeGroup newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOptionExcludeGroup newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOptionExcludeGroup query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOptionExcludeGroup whereGroupId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOptionExcludeGroup wherePaymentOptionId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class PaymentOptionExcludeGroup extends Model
|
||||
{
|
||||
protected $table = 'payment_option_exclude_group';
|
||||
public $incrementing = false;
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'payment_option_id' => 'int',
|
||||
'group_id' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'payment_option_id',
|
||||
'group_id'
|
||||
];
|
||||
|
||||
public function sf_guard_group()
|
||||
{
|
||||
return $this->belongsTo(SfGuardGroup::class, 'group_id');
|
||||
}
|
||||
|
||||
public function payment_option()
|
||||
{
|
||||
return $this->belongsTo(PaymentOption::class);
|
||||
}
|
||||
}
|
||||
45
dev/Models/PaymentOptionReference.php
Normal file
45
dev/Models/PaymentOptionReference.php
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class PaymentOptionReference
|
||||
*
|
||||
* @property int $parent_payment_option_id
|
||||
* @property int $child_payment_option_id
|
||||
* @property PaymentOption $payment_option
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOptionReference newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOptionReference newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOptionReference query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOptionReference whereChildPaymentOptionId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOptionReference whereParentPaymentOptionId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class PaymentOptionReference extends Model
|
||||
{
|
||||
protected $table = 'payment_option_reference';
|
||||
public $incrementing = false;
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'parent_payment_option_id' => 'int',
|
||||
'child_payment_option_id' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'parent_payment_option_id',
|
||||
'child_payment_option_id'
|
||||
];
|
||||
|
||||
public function payment_option()
|
||||
{
|
||||
return $this->belongsTo(PaymentOption::class, 'parent_payment_option_id');
|
||||
}
|
||||
}
|
||||
50
dev/Models/PaymentOptionTranslation.php
Normal file
50
dev/Models/PaymentOptionTranslation.php
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class PaymentOptionTranslation
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property string|null $description
|
||||
* @property string $lang
|
||||
* @property PaymentOption $payment_option
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOptionTranslation newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOptionTranslation newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOptionTranslation query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOptionTranslation whereDescription($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOptionTranslation whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOptionTranslation whereLang($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentOptionTranslation whereName($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class PaymentOptionTranslation extends Model
|
||||
{
|
||||
protected $table = 'payment_option_translation';
|
||||
public $incrementing = false;
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'id' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'name',
|
||||
'description',
|
||||
'lang'
|
||||
];
|
||||
|
||||
public function payment_option()
|
||||
{
|
||||
return $this->belongsTo(PaymentOption::class, 'id');
|
||||
}
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
51
dev/Models/PressReleaseContact.php
Normal file
51
dev/Models/PressReleaseContact.php
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class PressReleaseContact
|
||||
*
|
||||
* @property int $press_release_id
|
||||
* @property int $contact_id
|
||||
* @property Contact $contact
|
||||
* @property PressRelease $press_release
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseContact newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseContact newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseContact query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseContact whereContactId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseContact wherePressReleaseId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class PressReleaseContact extends Model
|
||||
{
|
||||
protected $table = 'press_release_contact';
|
||||
public $incrementing = false;
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'press_release_id' => 'int',
|
||||
'contact_id' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'press_release_id',
|
||||
'contact_id'
|
||||
];
|
||||
|
||||
public function contact()
|
||||
{
|
||||
return $this->belongsTo(Contact::class);
|
||||
}
|
||||
|
||||
public function press_release()
|
||||
{
|
||||
return $this->belongsTo(PressRelease::class);
|
||||
}
|
||||
}
|
||||
59
dev/Models/PressReleaseImage.php
Normal file
59
dev/Models/PressReleaseImage.php
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class PressReleaseImage
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $title
|
||||
* @property string $description
|
||||
* @property string $image
|
||||
* @property string $copyright
|
||||
* @property int|null $press_release_id
|
||||
* @property int|null $is_preview_image
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property string|null $slug
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseImage newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseImage newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseImage query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseImage whereCopyright($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseImage whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseImage whereDescription($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseImage whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseImage whereImage($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseImage whereIsPreviewImage($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseImage wherePressReleaseId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseImage whereSlug($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseImage whereTitle($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseImage whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class PressReleaseImage extends Model
|
||||
{
|
||||
protected $table = 'press_release_image';
|
||||
|
||||
protected $casts = [
|
||||
'press_release_id' => 'int',
|
||||
'is_preview_image' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'title',
|
||||
'description',
|
||||
'image',
|
||||
'copyright',
|
||||
'press_release_id',
|
||||
'is_preview_image',
|
||||
'slug'
|
||||
];
|
||||
}
|
||||
65
dev/Models/PressReleaseImageOld.php
Normal file
65
dev/Models/PressReleaseImageOld.php
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class PressReleaseImageOld
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $title
|
||||
* @property string $description
|
||||
* @property string $image
|
||||
* @property string $copyright
|
||||
* @property int|null $press_release_id
|
||||
* @property int|null $is_preview_image
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property string|null $slug
|
||||
* @property PressRelease|null $press_release
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseImageOld newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseImageOld newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseImageOld query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseImageOld whereCopyright($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseImageOld whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseImageOld whereDescription($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseImageOld whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseImageOld whereImage($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseImageOld whereIsPreviewImage($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseImageOld wherePressReleaseId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseImageOld whereSlug($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseImageOld whereTitle($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PressReleaseImageOld whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class PressReleaseImageOld extends Model
|
||||
{
|
||||
protected $table = 'press_release_image_old';
|
||||
|
||||
protected $casts = [
|
||||
'press_release_id' => 'int',
|
||||
'is_preview_image' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'title',
|
||||
'description',
|
||||
'image',
|
||||
'copyright',
|
||||
'press_release_id',
|
||||
'is_preview_image',
|
||||
'slug'
|
||||
];
|
||||
|
||||
public function press_release()
|
||||
{
|
||||
return $this->belongsTo(PressRelease::class);
|
||||
}
|
||||
}
|
||||
57
dev/Models/PromotionLink.php
Normal file
57
dev/Models/PromotionLink.php
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class PromotionLink
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $title
|
||||
* @property string $link
|
||||
* @property string $language
|
||||
* @property int|null $show_on_homepage
|
||||
* @property int|null $press_release_id
|
||||
* @property Collection|Category[] $categories
|
||||
* @package App\Models
|
||||
* @property-read int|null $categories_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionLink newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionLink newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionLink query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionLink whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionLink whereLanguage($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionLink whereLink($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionLink wherePressReleaseId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionLink whereShowOnHomepage($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionLink whereTitle($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class PromotionLink extends Model
|
||||
{
|
||||
protected $table = 'promotion_link';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'show_on_homepage' => 'int',
|
||||
'press_release_id' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'title',
|
||||
'link',
|
||||
'language',
|
||||
'show_on_homepage',
|
||||
'press_release_id'
|
||||
];
|
||||
|
||||
public function categories()
|
||||
{
|
||||
return $this->belongsToMany(Category::class, 'promotion_link_category');
|
||||
}
|
||||
}
|
||||
51
dev/Models/PromotionLinkCategory.php
Normal file
51
dev/Models/PromotionLinkCategory.php
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class PromotionLinkCategory
|
||||
*
|
||||
* @property int $promotion_link_id
|
||||
* @property int $category_id
|
||||
* @property Category $category
|
||||
* @property PromotionLink $promotion_link
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionLinkCategory newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionLinkCategory newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionLinkCategory query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionLinkCategory whereCategoryId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PromotionLinkCategory wherePromotionLinkId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class PromotionLinkCategory extends Model
|
||||
{
|
||||
protected $table = 'promotion_link_category';
|
||||
public $incrementing = false;
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'promotion_link_id' => 'int',
|
||||
'category_id' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'promotion_link_id',
|
||||
'category_id'
|
||||
];
|
||||
|
||||
public function category()
|
||||
{
|
||||
return $this->belongsTo(Category::class);
|
||||
}
|
||||
|
||||
public function promotion_link()
|
||||
{
|
||||
return $this->belongsTo(PromotionLink::class);
|
||||
}
|
||||
}
|
||||
51
dev/Models/ResponsibleCompanyUser.php
Normal file
51
dev/Models/ResponsibleCompanyUser.php
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class ResponsibleCompanyUser
|
||||
*
|
||||
* @property int $company_id
|
||||
* @property int $user_id
|
||||
* @property Company $company
|
||||
* @property SfGuardUser $sf_guard_user
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ResponsibleCompanyUser newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ResponsibleCompanyUser newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ResponsibleCompanyUser query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ResponsibleCompanyUser whereCompanyId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ResponsibleCompanyUser whereUserId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class ResponsibleCompanyUser extends Model
|
||||
{
|
||||
protected $table = 'responsible_company_user';
|
||||
public $incrementing = false;
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'company_id' => 'int',
|
||||
'user_id' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'company_id',
|
||||
'user_id'
|
||||
];
|
||||
|
||||
public function company()
|
||||
{
|
||||
return $this->belongsTo(Company::class);
|
||||
}
|
||||
|
||||
public function sf_guard_user()
|
||||
{
|
||||
return $this->belongsTo(SfGuardUser::class, 'user_id');
|
||||
}
|
||||
}
|
||||
68
dev/Models/Salutation.php
Normal file
68
dev/Models/Salutation.php
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class Salutation
|
||||
*
|
||||
* @property int $id
|
||||
* @property Collection|Contact[] $contacts
|
||||
* @property Collection|InvoiceBillingAddress[] $invoice_billing_addresses
|
||||
* @property Collection|NewsletterSubscription[] $newsletter_subscriptions
|
||||
* @property SalutationTranslation $salutation_translation
|
||||
* @property Collection|SfGuardUserProfile[] $sf_guard_user_profiles
|
||||
* @property Collection|UserBillingAddress[] $user_billing_addresses
|
||||
* @package App\Models
|
||||
* @property-read int|null $contacts_count
|
||||
* @property-read int|null $invoice_billing_addresses_count
|
||||
* @property-read int|null $newsletter_subscriptions_count
|
||||
* @property-read int|null $sf_guard_user_profiles_count
|
||||
* @property-read int|null $user_billing_addresses_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Salutation newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Salutation newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Salutation query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Salutation whereId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Salutation extends Model
|
||||
{
|
||||
protected $table = 'salutation';
|
||||
public $timestamps = false;
|
||||
|
||||
public function contacts()
|
||||
{
|
||||
return $this->hasMany(Contact::class);
|
||||
}
|
||||
|
||||
public function invoice_billing_addresses()
|
||||
{
|
||||
return $this->hasMany(InvoiceBillingAddress::class);
|
||||
}
|
||||
|
||||
public function newsletter_subscriptions()
|
||||
{
|
||||
return $this->hasMany(NewsletterSubscription::class);
|
||||
}
|
||||
|
||||
public function salutation_translation()
|
||||
{
|
||||
return $this->hasOne(SalutationTranslation::class, 'id');
|
||||
}
|
||||
|
||||
public function sf_guard_user_profiles()
|
||||
{
|
||||
return $this->hasMany(SfGuardUserProfile::class);
|
||||
}
|
||||
|
||||
public function user_billing_addresses()
|
||||
{
|
||||
return $this->hasMany(UserBillingAddress::class);
|
||||
}
|
||||
}
|
||||
47
dev/Models/SalutationTranslation.php
Normal file
47
dev/Models/SalutationTranslation.php
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class SalutationTranslation
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property string $lang
|
||||
* @property Salutation $salutation
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SalutationTranslation newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SalutationTranslation newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SalutationTranslation query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SalutationTranslation whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SalutationTranslation whereLang($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SalutationTranslation whereName($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class SalutationTranslation extends Model
|
||||
{
|
||||
protected $table = 'salutation_translation';
|
||||
public $incrementing = false;
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'id' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'name',
|
||||
'lang'
|
||||
];
|
||||
|
||||
public function salutation()
|
||||
{
|
||||
return $this->belongsTo(Salutation::class, 'id');
|
||||
}
|
||||
}
|
||||
63
dev/Models/SfGuardGroup.php
Normal file
63
dev/Models/SfGuardGroup.php
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class SfGuardGroup
|
||||
*
|
||||
* @property int $id
|
||||
* @property string|null $name
|
||||
* @property string|null $description
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property PaymentOptionAccessGroup $payment_option_access_group
|
||||
* @property PaymentOptionExcludeGroup $payment_option_exclude_group
|
||||
* @property SfGuardGroupPermission $sf_guard_group_permission
|
||||
* @property SfGuardUserGroup $sf_guard_user_group
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardGroup newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardGroup newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardGroup query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardGroup whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardGroup whereDescription($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardGroup whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardGroup whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardGroup whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class SfGuardGroup extends Model
|
||||
{
|
||||
protected $table = 'sf_guard_group';
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'description'
|
||||
];
|
||||
|
||||
public function payment_option_access_group()
|
||||
{
|
||||
return $this->hasOne(PaymentOptionAccessGroup::class, 'group_id');
|
||||
}
|
||||
|
||||
public function payment_option_exclude_group()
|
||||
{
|
||||
return $this->hasOne(PaymentOptionExcludeGroup::class, 'group_id');
|
||||
}
|
||||
|
||||
public function sf_guard_group_permission()
|
||||
{
|
||||
return $this->hasOne(SfGuardGroupPermission::class, 'group_id');
|
||||
}
|
||||
|
||||
public function sf_guard_user_group()
|
||||
{
|
||||
return $this->hasOne(SfGuardUserGroup::class, 'group_id');
|
||||
}
|
||||
}
|
||||
55
dev/Models/SfGuardGroupPermission.php
Normal file
55
dev/Models/SfGuardGroupPermission.php
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class SfGuardGroupPermission
|
||||
*
|
||||
* @property int $group_id
|
||||
* @property int $permission_id
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property SfGuardGroup $sf_guard_group
|
||||
* @property SfGuardPermission $sf_guard_permission
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardGroupPermission newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardGroupPermission newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardGroupPermission query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardGroupPermission whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardGroupPermission whereGroupId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardGroupPermission wherePermissionId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardGroupPermission whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class SfGuardGroupPermission extends Model
|
||||
{
|
||||
protected $table = 'sf_guard_group_permission';
|
||||
public $incrementing = false;
|
||||
|
||||
protected $casts = [
|
||||
'group_id' => 'int',
|
||||
'permission_id' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'group_id',
|
||||
'permission_id'
|
||||
];
|
||||
|
||||
public function sf_guard_group()
|
||||
{
|
||||
return $this->belongsTo(SfGuardGroup::class, 'group_id');
|
||||
}
|
||||
|
||||
public function sf_guard_permission()
|
||||
{
|
||||
return $this->belongsTo(SfGuardPermission::class, 'permission_id');
|
||||
}
|
||||
}
|
||||
51
dev/Models/SfGuardPermission.php
Normal file
51
dev/Models/SfGuardPermission.php
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class SfGuardPermission
|
||||
*
|
||||
* @property int $id
|
||||
* @property string|null $name
|
||||
* @property string|null $description
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property SfGuardGroupPermission $sf_guard_group_permission
|
||||
* @property SfGuardUserPermission $sf_guard_user_permission
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardPermission newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardPermission newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardPermission query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardPermission whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardPermission whereDescription($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardPermission whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardPermission whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardPermission whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class SfGuardPermission extends Model
|
||||
{
|
||||
protected $table = 'sf_guard_permission';
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'description'
|
||||
];
|
||||
|
||||
public function sf_guard_group_permission()
|
||||
{
|
||||
return $this->hasOne(SfGuardGroupPermission::class, 'permission_id');
|
||||
}
|
||||
|
||||
public function sf_guard_user_permission()
|
||||
{
|
||||
return $this->hasOne(SfGuardUserPermission::class, 'permission_id');
|
||||
}
|
||||
}
|
||||
52
dev/Models/SfGuardRememberKey.php
Normal file
52
dev/Models/SfGuardRememberKey.php
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class SfGuardRememberKey
|
||||
*
|
||||
* @property int $id
|
||||
* @property int|null $user_id
|
||||
* @property string|null $remember_key
|
||||
* @property string $ip_address
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property SfGuardUser|null $sf_guard_user
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardRememberKey newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardRememberKey newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardRememberKey query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardRememberKey whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardRememberKey whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardRememberKey whereIpAddress($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardRememberKey whereRememberKey($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardRememberKey whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardRememberKey whereUserId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class SfGuardRememberKey extends Model
|
||||
{
|
||||
protected $table = 'sf_guard_remember_key';
|
||||
|
||||
protected $casts = [
|
||||
'user_id' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'remember_key',
|
||||
'ip_address'
|
||||
];
|
||||
|
||||
public function sf_guard_user()
|
||||
{
|
||||
return $this->belongsTo(SfGuardUser::class, 'user_id');
|
||||
}
|
||||
}
|
||||
155
dev/Models/SfGuardUser.php
Normal file
155
dev/Models/SfGuardUser.php
Normal file
|
|
@ -0,0 +1,155 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class SfGuardUser
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $username
|
||||
* @property string $algorithm
|
||||
* @property string|null $salt
|
||||
* @property string|null $password
|
||||
* @property int|null $is_active
|
||||
* @property int|null $is_super_admin
|
||||
* @property Carbon|null $last_login
|
||||
* @property string|null $ip_address
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property Collection|ApiUser[] $api_users
|
||||
* @property Collection|Company[] $companies
|
||||
* @property CompanyUser $company_user
|
||||
* @property Collection|Invoice[] $invoices
|
||||
* @property Collection|NewsletterSubscription[] $newsletter_subscriptions
|
||||
* @property Collection|PressRelease[] $press_releases
|
||||
* @property ResponsibleCompanyUser $responsible_company_user
|
||||
* @property Collection|SfGuardRememberKey[] $sf_guard_remember_keys
|
||||
* @property SfGuardUserGroup $sf_guard_user_group
|
||||
* @property SfGuardUserPermission $sf_guard_user_permission
|
||||
* @property Collection|SfGuardUserProfile[] $sf_guard_user_profiles
|
||||
* @property Collection|UserBillingAddress[] $user_billing_addresses
|
||||
* @property Collection|UserPaymentOption[] $user_payment_options
|
||||
* @package App\Models
|
||||
* @property-read int|null $api_users_count
|
||||
* @property-read int|null $companies_count
|
||||
* @property-read int|null $invoices_count
|
||||
* @property-read int|null $newsletter_subscriptions_count
|
||||
* @property-read int|null $press_releases_count
|
||||
* @property-read int|null $sf_guard_remember_keys_count
|
||||
* @property-read int|null $sf_guard_user_profiles_count
|
||||
* @property-read int|null $user_billing_addresses_count
|
||||
* @property-read int|null $user_payment_options_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUser newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUser newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUser query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUser whereAlgorithm($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUser whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUser whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUser whereIpAddress($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUser whereIsActive($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUser whereIsSuperAdmin($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUser whereLastLogin($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUser wherePassword($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUser whereSalt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUser whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUser whereUsername($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class SfGuardUser extends Model
|
||||
{
|
||||
protected $table = 'sf_guard_user';
|
||||
|
||||
protected $casts = [
|
||||
'is_active' => 'int',
|
||||
'is_super_admin' => 'int',
|
||||
'last_login' => 'datetime'
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
'password'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'username',
|
||||
'algorithm',
|
||||
'salt',
|
||||
'password',
|
||||
'is_active',
|
||||
'is_super_admin',
|
||||
'last_login',
|
||||
'ip_address'
|
||||
];
|
||||
|
||||
public function api_users()
|
||||
{
|
||||
return $this->hasMany(ApiUser::class, 'user_id');
|
||||
}
|
||||
|
||||
public function companies()
|
||||
{
|
||||
return $this->hasMany(Company::class, 'user_id');
|
||||
}
|
||||
|
||||
public function company_user()
|
||||
{
|
||||
return $this->hasOne(CompanyUser::class, 'user_id');
|
||||
}
|
||||
|
||||
public function invoices()
|
||||
{
|
||||
return $this->hasMany(Invoice::class, 'user_id');
|
||||
}
|
||||
|
||||
public function newsletter_subscriptions()
|
||||
{
|
||||
return $this->hasMany(NewsletterSubscription::class, 'user_id');
|
||||
}
|
||||
|
||||
public function press_releases()
|
||||
{
|
||||
return $this->hasMany(PressRelease::class, 'user_id');
|
||||
}
|
||||
|
||||
public function responsible_company_user()
|
||||
{
|
||||
return $this->hasOne(ResponsibleCompanyUser::class, 'user_id');
|
||||
}
|
||||
|
||||
public function sf_guard_remember_keys()
|
||||
{
|
||||
return $this->hasMany(SfGuardRememberKey::class, 'user_id');
|
||||
}
|
||||
|
||||
public function sf_guard_user_group()
|
||||
{
|
||||
return $this->hasOne(SfGuardUserGroup::class, 'user_id');
|
||||
}
|
||||
|
||||
public function sf_guard_user_permission()
|
||||
{
|
||||
return $this->hasOne(SfGuardUserPermission::class, 'user_id');
|
||||
}
|
||||
|
||||
public function sf_guard_user_profiles()
|
||||
{
|
||||
return $this->hasMany(SfGuardUserProfile::class, 'user_id');
|
||||
}
|
||||
|
||||
public function user_billing_addresses()
|
||||
{
|
||||
return $this->hasMany(UserBillingAddress::class, 'user_id');
|
||||
}
|
||||
|
||||
public function user_payment_options()
|
||||
{
|
||||
return $this->hasMany(UserPaymentOption::class, 'user_id');
|
||||
}
|
||||
}
|
||||
55
dev/Models/SfGuardUserGroup.php
Normal file
55
dev/Models/SfGuardUserGroup.php
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class SfGuardUserGroup
|
||||
*
|
||||
* @property int $user_id
|
||||
* @property int $group_id
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property SfGuardGroup $sf_guard_group
|
||||
* @property SfGuardUser $sf_guard_user
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserGroup newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserGroup newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserGroup query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserGroup whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserGroup whereGroupId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserGroup whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserGroup whereUserId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class SfGuardUserGroup extends Model
|
||||
{
|
||||
protected $table = 'sf_guard_user_group';
|
||||
public $incrementing = false;
|
||||
|
||||
protected $casts = [
|
||||
'user_id' => 'int',
|
||||
'group_id' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'group_id'
|
||||
];
|
||||
|
||||
public function sf_guard_group()
|
||||
{
|
||||
return $this->belongsTo(SfGuardGroup::class, 'group_id');
|
||||
}
|
||||
|
||||
public function sf_guard_user()
|
||||
{
|
||||
return $this->belongsTo(SfGuardUser::class, 'user_id');
|
||||
}
|
||||
}
|
||||
55
dev/Models/SfGuardUserPermission.php
Normal file
55
dev/Models/SfGuardUserPermission.php
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class SfGuardUserPermission
|
||||
*
|
||||
* @property int $user_id
|
||||
* @property int $permission_id
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property SfGuardPermission $sf_guard_permission
|
||||
* @property SfGuardUser $sf_guard_user
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserPermission newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserPermission newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserPermission query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserPermission whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserPermission wherePermissionId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserPermission whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserPermission whereUserId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class SfGuardUserPermission extends Model
|
||||
{
|
||||
protected $table = 'sf_guard_user_permission';
|
||||
public $incrementing = false;
|
||||
|
||||
protected $casts = [
|
||||
'user_id' => 'int',
|
||||
'permission_id' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'permission_id'
|
||||
];
|
||||
|
||||
public function sf_guard_permission()
|
||||
{
|
||||
return $this->belongsTo(SfGuardPermission::class, 'permission_id');
|
||||
}
|
||||
|
||||
public function sf_guard_user()
|
||||
{
|
||||
return $this->belongsTo(SfGuardUser::class, 'user_id');
|
||||
}
|
||||
}
|
||||
129
dev/Models/SfGuardUserProfile.php
Normal file
129
dev/Models/SfGuardUserProfile.php
Normal file
|
|
@ -0,0 +1,129 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class SfGuardUserProfile
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $user_id
|
||||
* @property int $salutation_id
|
||||
* @property string|null $title
|
||||
* @property string $first_name
|
||||
* @property string $last_name
|
||||
* @property string $address
|
||||
* @property int $country_id
|
||||
* @property string|null $phone
|
||||
* @property string $email
|
||||
* @property Carbon|null $birthdate
|
||||
* @property string $language
|
||||
* @property string|null $backlink_url
|
||||
* @property int|null $show_stats
|
||||
* @property Carbon|null $validation_date
|
||||
* @property Carbon|null $contract_date
|
||||
* @property string $registration_type
|
||||
* @property string|null $validate
|
||||
* @property string $api_key
|
||||
* @property string|null $tax_id_number
|
||||
* @property int|null $tax_exempt
|
||||
* @property string|null $tax_exempt_reason
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property int $disable_footer_code
|
||||
* @property Country $country
|
||||
* @property Salutation $salutation
|
||||
* @property SfGuardUser $sf_guard_user
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserProfile newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserProfile newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserProfile query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserProfile whereAddress($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserProfile whereApiKey($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserProfile whereBacklinkUrl($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserProfile whereBirthdate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserProfile whereContractDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserProfile whereCountryId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserProfile whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserProfile whereDisableFooterCode($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserProfile whereEmail($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserProfile whereFirstName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserProfile whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserProfile whereLanguage($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserProfile whereLastName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserProfile wherePhone($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserProfile whereRegistrationType($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserProfile whereSalutationId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserProfile whereShowStats($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserProfile whereTaxExempt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserProfile whereTaxExemptReason($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserProfile whereTaxIdNumber($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserProfile whereTitle($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserProfile whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserProfile whereUserId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserProfile whereValidate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|SfGuardUserProfile whereValidationDate($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class SfGuardUserProfile extends Model
|
||||
{
|
||||
protected $table = 'sf_guard_user_profile';
|
||||
|
||||
protected $casts = [
|
||||
'user_id' => 'int',
|
||||
'salutation_id' => 'int',
|
||||
'country_id' => 'int',
|
||||
'birthdate' => 'datetime',
|
||||
'show_stats' => 'int',
|
||||
'validation_date' => 'datetime',
|
||||
'contract_date' => 'datetime',
|
||||
'tax_exempt' => 'int',
|
||||
'disable_footer_code' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'salutation_id',
|
||||
'title',
|
||||
'first_name',
|
||||
'last_name',
|
||||
'address',
|
||||
'country_id',
|
||||
'phone',
|
||||
'email',
|
||||
'birthdate',
|
||||
'language',
|
||||
'backlink_url',
|
||||
'show_stats',
|
||||
'validation_date',
|
||||
'contract_date',
|
||||
'registration_type',
|
||||
'validate',
|
||||
'api_key',
|
||||
'tax_id_number',
|
||||
'tax_exempt',
|
||||
'tax_exempt_reason',
|
||||
'disable_footer_code'
|
||||
];
|
||||
|
||||
public function country()
|
||||
{
|
||||
return $this->belongsTo(Country::class);
|
||||
}
|
||||
|
||||
public function salutation()
|
||||
{
|
||||
return $this->belongsTo(Salutation::class);
|
||||
}
|
||||
|
||||
public function sf_guard_user()
|
||||
{
|
||||
return $this->belongsTo(SfGuardUser::class, 'user_id');
|
||||
}
|
||||
}
|
||||
108
dev/Models/User.php
Normal file
108
dev/Models/User.php
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
// use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||
use App\Mail\MailResetPassword;
|
||||
use Laravel\Sanctum\HasApiTokens;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
|
||||
/**
|
||||
* App\Models\User
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property string $email
|
||||
* @property \Illuminate\Support\Carbon|null $email_verified_at
|
||||
* @property mixed $password
|
||||
* @property string|null $remember_token
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection<int, \Illuminate\Notifications\DatabaseNotification> $notifications
|
||||
* @property-read int|null $notifications_count
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \Laravel\Sanctum\PersonalAccessToken> $tokens
|
||||
* @property-read int|null $tokens_count
|
||||
* @method static \Database\Factories\UserFactory factory($count = null, $state = [])
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|User newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|User newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|User query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|User whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|User whereEmail($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|User whereEmailVerifiedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|User whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|User whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|User wherePassword($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|User whereRememberToken($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|User whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class User extends Authenticatable
|
||||
{
|
||||
use HasApiTokens, HasFactory, Notifiable;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'email',
|
||||
'password',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be hidden for serialization.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $hidden = [
|
||||
'password',
|
||||
'remember_token',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected $casts = [
|
||||
'email_verified_at' => 'datetime',
|
||||
'password' => 'hashed',
|
||||
];
|
||||
|
||||
public function isAdmin()
|
||||
{
|
||||
if($this->admin >= 1){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function isSuperAdmin()
|
||||
{
|
||||
if($this->admin >= 2){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function isSysAdmin()
|
||||
{
|
||||
if($this->admin >= 3){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function sendPasswordResetNotification($token)
|
||||
{
|
||||
//$bcc[] = "kevin.adametz@me.com"; //config('app.checkout_mail');
|
||||
//Mail::to($this->email)->bcc($bcc)->locale(\App::getLocale())->send(new MailResetPassword($token, $this));
|
||||
Mail::to($this->email)->send(new MailResetPassword($token, $this));
|
||||
//$this->notify(new ResetPasswordNotification($token));
|
||||
}
|
||||
}
|
||||
90
dev/Models/UserBillingAddress.php
Normal file
90
dev/Models/UserBillingAddress.php
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class UserBillingAddress
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $user_id
|
||||
* @property int|null $salutation_id
|
||||
* @property string|null $title
|
||||
* @property string $name
|
||||
* @property string|null $address
|
||||
* @property string|null $address1
|
||||
* @property string|null $address2
|
||||
* @property string|null $postal_code
|
||||
* @property string|null $city
|
||||
* @property int|null $country_id
|
||||
* @property string|null $country_name
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property Country|null $country
|
||||
* @property Salutation|null $salutation
|
||||
* @property SfGuardUser $sf_guard_user
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserBillingAddress newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserBillingAddress newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserBillingAddress query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserBillingAddress whereAddress($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserBillingAddress whereAddress1($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserBillingAddress whereAddress2($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserBillingAddress whereCity($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserBillingAddress whereCountryId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserBillingAddress whereCountryName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserBillingAddress whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserBillingAddress whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserBillingAddress whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserBillingAddress wherePostalCode($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserBillingAddress whereSalutationId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserBillingAddress whereTitle($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserBillingAddress whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserBillingAddress whereUserId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class UserBillingAddress extends Model
|
||||
{
|
||||
protected $table = 'user_billing_address';
|
||||
|
||||
protected $casts = [
|
||||
'user_id' => 'int',
|
||||
'salutation_id' => 'int',
|
||||
'country_id' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'salutation_id',
|
||||
'title',
|
||||
'name',
|
||||
'address',
|
||||
'address1',
|
||||
'address2',
|
||||
'postal_code',
|
||||
'city',
|
||||
'country_id',
|
||||
'country_name'
|
||||
];
|
||||
|
||||
public function country()
|
||||
{
|
||||
return $this->belongsTo(Country::class);
|
||||
}
|
||||
|
||||
public function salutation()
|
||||
{
|
||||
return $this->belongsTo(Salutation::class);
|
||||
}
|
||||
|
||||
public function sf_guard_user()
|
||||
{
|
||||
return $this->belongsTo(SfGuardUser::class, 'user_id');
|
||||
}
|
||||
}
|
||||
61
dev/Models/UserPayment.php
Normal file
61
dev/Models/UserPayment.php
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class UserPayment
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $user_payment_option_id
|
||||
* @property float $amount
|
||||
* @property string $status
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property UserPaymentOption $user_payment_option
|
||||
* @property Collection|Invoice[] $invoices
|
||||
* @package App\Models
|
||||
* @property-read int|null $invoices_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPayment newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPayment newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPayment query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPayment whereAmount($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPayment whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPayment whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPayment whereStatus($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPayment whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPayment whereUserPaymentOptionId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class UserPayment extends Model
|
||||
{
|
||||
protected $table = 'user_payment';
|
||||
|
||||
protected $casts = [
|
||||
'user_payment_option_id' => 'int',
|
||||
'amount' => 'float'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'user_payment_option_id',
|
||||
'amount',
|
||||
'status'
|
||||
];
|
||||
|
||||
public function user_payment_option()
|
||||
{
|
||||
return $this->belongsTo(UserPaymentOption::class);
|
||||
}
|
||||
|
||||
public function invoices()
|
||||
{
|
||||
return $this->hasMany(Invoice::class);
|
||||
}
|
||||
}
|
||||
100
dev/Models/UserPaymentOption.php
Normal file
100
dev/Models/UserPaymentOption.php
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class UserPaymentOption
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $user_id
|
||||
* @property int $payment_option_id
|
||||
* @property int|null $coupon_id
|
||||
* @property string $status
|
||||
* @property Carbon|null $valid_until_date
|
||||
* @property Carbon|null $next_due_date
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property Coupon|null $coupon
|
||||
* @property PaymentOption $payment_option
|
||||
* @property SfGuardUser $sf_guard_user
|
||||
* @property Collection|UserPayment[] $user_payments
|
||||
* @property Collection|Company[] $companies
|
||||
* @property UserPaymentOptionReference $user_payment_option_reference
|
||||
* @package App\Models
|
||||
* @property-read int|null $companies_count
|
||||
* @property-read int|null $user_payments_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPaymentOption newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPaymentOption newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPaymentOption query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPaymentOption whereCouponId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPaymentOption whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPaymentOption whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPaymentOption whereNextDueDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPaymentOption wherePaymentOptionId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPaymentOption whereStatus($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPaymentOption whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPaymentOption whereUserId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPaymentOption whereValidUntilDate($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class UserPaymentOption extends Model
|
||||
{
|
||||
protected $table = 'user_payment_option';
|
||||
|
||||
protected $casts = [
|
||||
'user_id' => 'int',
|
||||
'payment_option_id' => 'int',
|
||||
'coupon_id' => 'int',
|
||||
'valid_until_date' => 'datetime',
|
||||
'next_due_date' => 'datetime'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'payment_option_id',
|
||||
'coupon_id',
|
||||
'status',
|
||||
'valid_until_date',
|
||||
'next_due_date'
|
||||
];
|
||||
|
||||
public function coupon()
|
||||
{
|
||||
return $this->belongsTo(Coupon::class);
|
||||
}
|
||||
|
||||
public function payment_option()
|
||||
{
|
||||
return $this->belongsTo(PaymentOption::class);
|
||||
}
|
||||
|
||||
public function sf_guard_user()
|
||||
{
|
||||
return $this->belongsTo(SfGuardUser::class, 'user_id');
|
||||
}
|
||||
|
||||
public function user_payments()
|
||||
{
|
||||
return $this->hasMany(UserPayment::class);
|
||||
}
|
||||
|
||||
public function companies()
|
||||
{
|
||||
return $this->belongsToMany(Company::class, 'user_payment_option_company', 'payment_option_id')
|
||||
->withPivot('ip_address', 'is_active')
|
||||
->withTimestamps();
|
||||
}
|
||||
|
||||
public function user_payment_option_reference()
|
||||
{
|
||||
return $this->hasOne(UserPaymentOptionReference::class, 'parent_user_payment_option_id');
|
||||
}
|
||||
}
|
||||
62
dev/Models/UserPaymentOptionCompany.php
Normal file
62
dev/Models/UserPaymentOptionCompany.php
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class UserPaymentOptionCompany
|
||||
*
|
||||
* @property int $payment_option_id
|
||||
* @property int $company_id
|
||||
* @property string|null $ip_address
|
||||
* @property int|null $is_active
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property Company $company
|
||||
* @property UserPaymentOption $user_payment_option
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPaymentOptionCompany newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPaymentOptionCompany newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPaymentOptionCompany query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPaymentOptionCompany whereCompanyId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPaymentOptionCompany whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPaymentOptionCompany whereIpAddress($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPaymentOptionCompany whereIsActive($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPaymentOptionCompany wherePaymentOptionId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPaymentOptionCompany whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class UserPaymentOptionCompany extends Model
|
||||
{
|
||||
protected $table = 'user_payment_option_company';
|
||||
public $incrementing = false;
|
||||
|
||||
protected $casts = [
|
||||
'payment_option_id' => 'int',
|
||||
'company_id' => 'int',
|
||||
'is_active' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'payment_option_id',
|
||||
'company_id',
|
||||
'ip_address',
|
||||
'is_active'
|
||||
];
|
||||
|
||||
public function company()
|
||||
{
|
||||
return $this->belongsTo(Company::class);
|
||||
}
|
||||
|
||||
public function user_payment_option()
|
||||
{
|
||||
return $this->belongsTo(UserPaymentOption::class, 'payment_option_id');
|
||||
}
|
||||
}
|
||||
45
dev/Models/UserPaymentOptionReference.php
Normal file
45
dev/Models/UserPaymentOptionReference.php
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class UserPaymentOptionReference
|
||||
*
|
||||
* @property int $parent_user_payment_option_id
|
||||
* @property int $child_user_payment_option_id
|
||||
* @property UserPaymentOption $user_payment_option
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPaymentOptionReference newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPaymentOptionReference newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPaymentOptionReference query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPaymentOptionReference whereChildUserPaymentOptionId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserPaymentOptionReference whereParentUserPaymentOptionId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class UserPaymentOptionReference extends Model
|
||||
{
|
||||
protected $table = 'user_payment_option_reference';
|
||||
public $incrementing = false;
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'parent_user_payment_option_id' => 'int',
|
||||
'child_user_payment_option_id' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'parent_user_payment_option_id',
|
||||
'child_user_payment_option_id'
|
||||
];
|
||||
|
||||
public function user_payment_option()
|
||||
{
|
||||
return $this->belongsTo(UserPaymentOption::class, 'parent_user_payment_option_id');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue