Convert role column to a new table

This commit is contained in:
Luka Radenovic 2022-04-13 15:11:51 +02:00
parent f377b4ce45
commit 7661088814
4 changed files with 54 additions and 2 deletions

View file

@ -1 +1,2 @@
from .users import *
from .users import *
from .models import *

10
areas/users/models.py Normal file
View file

@ -0,0 +1,10 @@
from sqlalchemy import Integer, String
from database import db
class Role(db.Model):
id = db.Column(Integer, primary_key=True)
name = db.Column(String(length=64))
def __repr__(self):
return f"Role {self.name}"