Completed
Push — master ( 91f666...3f0f06 )
by Jared
01:52
created

SoftDelete::autoDefinitionSoftDelete()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Pulsar\Traits;
4
5
use Pulsar\Type;
6
7
/**
8
 * Installs `deleted_at` properties on the model.
9
 */
10
trait SoftDelete
11
{
12
    protected static function autoDefinitionSoftDelete(): void
13
    {
14
        static::$properties['deleted_at'] = [
15
            'type' => Type::DATE,
16
            'validate' => 'timestamp|db_timestamp',
17
            'null' => true,
18
        ];
19
    }
20
}
21