Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117878546
Sku.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
Sku.php
View Options
<?php
namespace
App
;
use
Illuminate\Database\Eloquent\Model
;
use
Spatie\Translatable\HasTranslations
;
use
App\Traits\BelongsToTenantTrait
;
use
App\Traits\UuidStrKeyTrait
;
/**
* The eloquent definition of a Stock Keeping Unit (SKU).
*
* @property bool $active
* @property int $cost
* @property string $description
* @property int $fee The fee that the tenant pays to us
* @property string $handler_class
* @property string $id
* @property string $name
* @property string $period
* @property ?int $tenant_id
* @property string $title
* @property int $units_free
*/
class
Sku
extends
Model
{
use
BelongsToTenantTrait
;
use
HasTranslations
;
use
UuidStrKeyTrait
;
protected
$casts
=
[
'units_free'
=>
'integer'
];
protected
$fillable
=
[
'active'
,
'cost'
,
'description'
,
'fee'
,
'handler_class'
,
'name'
,
// persist for annual domain registration
'period'
,
'title'
,
'units_free'
,
];
/** @var array Translatable properties */
public
$translatable
=
[
'name'
,
'description'
,
];
/**
* List the entitlements that consume this SKU.
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public
function
entitlements
()
{
return
$this
->
hasMany
(
'App
\E
ntitlement'
);
}
/**
* List of packages that use this SKU.
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
*/
public
function
packages
()
{
return
$this
->
belongsToMany
(
'App
\P
ackage'
,
'package_skus'
)->
using
(
'App
\P
ackageSku'
)->
withPivot
([
'cost'
,
'qty'
]);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Apr 5, 10:18 PM (2 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
f9/2f/8256ff0d5f680fa0054fc0c37252
Default Alt Text
Sku.php (1 KB)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline