01 2020
This commit is contained in:
parent
f117f79bb9
commit
3711fcc8d0
101 changed files with 4027 additions and 918 deletions
70
app/Models/File.php
Normal file
70
app/Models/File.php
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\User;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class File
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $user_id
|
||||
* @property string $filename
|
||||
* @property string $dir
|
||||
* @property string $original_name
|
||||
* @property string $ext
|
||||
* @property string $mine
|
||||
* @property int $size
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $updated_at
|
||||
*
|
||||
* @property User $user
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class File extends Model
|
||||
{
|
||||
protected $table = 'files';
|
||||
|
||||
protected $casts = [
|
||||
'user_id' => 'int',
|
||||
'size' => 'int'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'user_id',
|
||||
'identifier',
|
||||
'filename',
|
||||
'dir',
|
||||
'original_name',
|
||||
'ext',
|
||||
'mine',
|
||||
'size'
|
||||
];
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
|
||||
public function formatBytes($precision = 2)
|
||||
{
|
||||
$size = $this->size;
|
||||
|
||||
if ($size > 0) {
|
||||
$size = (int) $size;
|
||||
$base = log($size) / log(1024);
|
||||
$suffixes = array(' bytes', ' KB', ' MB', ' GB', ' TB');
|
||||
|
||||
return round(pow(1024, $base - floor($base)), $precision) . $suffixes[floor($base)];
|
||||
} else {
|
||||
return $size;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -66,19 +66,22 @@ class ShoppingPayment extends Model
|
|||
|
||||
public function getPaymentType(){
|
||||
|
||||
if($this->clearingtype == 'wlt') {
|
||||
if ($this->wallettype == 'PPE') {
|
||||
if($this->clearingtype === 'wlt') {
|
||||
if ($this->wallettype === 'PPE') {
|
||||
return 'PayPal';
|
||||
}
|
||||
}
|
||||
if($this->clearingtype == 'cc') {
|
||||
if($this->clearingtype === 'cc') {
|
||||
return 'Kreditkarte';
|
||||
}
|
||||
if($this->clearingtype == 'vor') {
|
||||
if($this->clearingtype === 'vor') {
|
||||
return 'Vorkasse';
|
||||
}
|
||||
if($this->clearingtype == 'sb') {
|
||||
if ($this->onlinebanktransfertype == 'PNT') {
|
||||
if($this->clearingtype === 'elv') {
|
||||
return 'SEPA Lastschrift';
|
||||
}
|
||||
if($this->clearingtype === 'sb') {
|
||||
if ($this->onlinebanktransfertype === 'PNT') {
|
||||
return 'Sofort Überweisung';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,6 +69,10 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereShippingZipcode($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
* @property int|null $orders
|
||||
* @property-read \App\Models\ShoppingOrder $shopping_order
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ShoppingOrder[] $shopping_orders
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingUser whereOrders($value)
|
||||
*/
|
||||
class ShoppingUser extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -101,6 +101,18 @@ use Carbon\Carbon;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereWebsite($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereZipcode($value)
|
||||
* @property string|null $m_account
|
||||
* @property string|null $m_salutation
|
||||
* @property string|null $m_first_name
|
||||
* @property string|null $m_last_name
|
||||
* @property string|null $m_notes
|
||||
* @property int|null $taxable_sales
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereMAccount($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereMFirstName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereMLastName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereMNotes($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereMSalutation($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereTaxableSales($value)
|
||||
*/
|
||||
class UserAccount extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,6 +4,30 @@ namespace App\Models;
|
|||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* App\Models\UserLevel
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property array|null $trans_name
|
||||
* @property float|null $margin
|
||||
* @property int|null $pos
|
||||
* @property int $active
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserLevel newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserLevel newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserLevel query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserLevel whereActive($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserLevel whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserLevel whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserLevel whereMargin($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserLevel whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserLevel wherePos($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserLevel whereTransName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserLevel whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class UserLevel extends Model
|
||||
{
|
||||
protected $table = 'user_levels';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue