Completed
Push — master ( ac8e27...9493cd )
by -
01:40
created

NaxsiWhitelistSets   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 75%
Metric Value
wmc 1
dl 0
loc 14
ccs 9
cts 12
cp 0.75
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __init__() 0 4 1
1 1
from spike.model import db
2
3
4 1
class NaxsiWhitelistSets(db.Model):
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
5 1
    __bind_key__ = 'rules'
6 1
    __tablename__ = 'naxsi_whitelistsets'
7
8 1
    id = db.Column(db.Integer, primary_key=True)
9 1
    name = db.Column(db.String(1024), nullable=False, unique=True)
10 1
    remarks = db.Column(db.Text, nullable=False)
11 1
    timestamp = db.Column(db.Integer, nullable=False)
12 1
    db.UniqueConstraint('name')
13
14 1
    def __init__(self, name, remarks, timestamp):
15
        self.name = name
16
        self.remarks = remarks
17
        self.timestamp = timestamp
18