private function buildParts($template)
    {
        $camelName = Str::camel($this->name);
        // Insert table names
        $tableName = strtolower($camelName);
        if ($this->soft == 1) {
            $soft_call = 'use Illuminate\Database\Eloquent\SoftDeletes;';
            $soft_use  = 'use SoftDeletes;';
            $soft_date = '/**
    * The attributes that should be mutated to dates.
    *
    * @var array
    */
    protected $dates = [\'deleted_at\'];';
        } else {
            $soft_call = '';
            $soft_use  = '';
            $soft_date = '';
        }
        $template = str_replace([
            '$NAMESPACE$',
            '$SOFT_DELETE_CALL$',
            '$SOFT_DELETE_USE$',
            '$SOFT_DELETE_DATES$',
            '$TABLENAME$',
            '$CLASS$',
            '$FILLABLE$',
            '$RELATIONSHIPS$',
            '$PASSWORDHASH_CALL$',
            '$PASSWORDHASH$',
            '$DATEPICKERS_CALL$',
            '$DATEPICKERS$',
            '$DATETIMEPICKERS$',
            '$ENUMS$',
        ], [
            $this->namespace,
            $soft_call,
            $soft_use,
            $soft_date,
            $tableName,
            $this->className,
            $this->buildFillables(),
            $this->buildRelationships(),
            $this->password > 0 ? "use Illuminate\Support\Facades\Hash; \n\r" : '',
            $this->password > 0 ? $this->passwordHash() : '',
            $this->date > 0 || $this->datetime > 0 ? "use Carbon\Carbon; \n\r" : '',
            $this->date > 0 ? $this->datepickers() : '',
            $this->datetime > 0 ? $this->datetimepickers() : '',
            $this->enum > 0 ? $this->enum() : '',
        ], $template);

        return $template;
    }