from infosystem.database import db
from infosystem.common.subsystem import entity


class Domain(entity.Entity, db.Model):

    attributes = ['id', 'active', 'name', 'parent_id']

    active = db.Column(db.Boolean(), nullable=False)
    name = db.Column(db.String(80), nullable=False, unique=True)
    parent_id = db.Column(
        db.CHAR(32), db.ForeignKey("domain.id"), nullable=True)

    def __init__(self, id, name, parent_id=None, active=True):
        super().__init__(id)
        self.active = active
        self.name = name
        self.parent_id = parent_id

@@ -261,9 +261,9 @@
 ing(
-8
+6
 0), 
@@ -416,16 +416,29 @@
 , name, 
+active=True, 
 parent_i
@@ -442,29 +442,16 @@
 t_id=Non
-e, active=Tru
 e):%0A    

Change domain entity constructor