@@ 4-17 (lines=14) @@ | ||
1 | from spike.model import db |
|
2 | ||
3 | ||
4 | class NaxsiRuleSets(db.Model): |
|
5 | __bind_key__ = 'rules' |
|
6 | __tablename__ = 'naxsi_rulesets' |
|
7 | ||
8 | id = db.Column(db.Integer, primary_key=True) |
|
9 | name = db.Column(db.String(1024), nullable=False, unique=True) |
|
10 | remarks = db.Column(db.Text, nullable=False) |
|
11 | timestamp = db.Column(db.Integer, nullable=False) |
|
12 | db.UniqueConstraint('name') |
|
13 | ||
14 | def __init__(self, name, remarks, timestamp): |
|
15 | self.name = name |
|
16 | self.remarks = remarks |
|
17 | self.timestamp = timestamp |
|
18 |
@@ 4-17 (lines=14) @@ | ||
1 | from spike.model import db |
|
2 | ||
3 | ||
4 | class NaxsiWhitelistSets(db.Model): |
|
5 | __bind_key__ = 'rules' |
|
6 | __tablename__ = 'naxsi_whitelistsets' |
|
7 | ||
8 | id = db.Column(db.Integer, primary_key=True) |
|
9 | name = db.Column(db.String(1024), nullable=False, unique=True) |
|
10 | remarks = db.Column(db.Text, nullable=False) |
|
11 | timestamp = db.Column(db.Integer, nullable=False) |
|
12 | db.UniqueConstraint('name') |
|
13 | ||
14 | def __init__(self, name, remarks, timestamp): |
|
15 | self.name = name |
|
16 | self.remarks = remarks |
|
17 | self.timestamp = timestamp |
|
18 |