Add last login info for users.

This commit is contained in:
grossmj committed 2021-06-03 16:57:16 +09:30
1 parent 4e33d29af8
commit 6fb6a27859
4 files changed
+15 -3

No files matched your search

+2 -1
View File
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from sqlalchemy import Table, Boolean, Column, String, ForeignKey, event
from sqlalchemy import Table, Boolean, Column, String, DateTime, ForeignKey, event
from sqlalchemy.orm import relationship
from .base import Base, BaseTable, generate_uuid, GUID
@@ -45,6 +45,7 @@ class User(BaseTable):
email = Column(String, unique=True, index=True)
full_name = Column(String)
hashed_password = Column(String)
last_login = Column(DateTime)
is_active = Column(Boolean, default=True)
is_superadmin = Column(Boolean, default=False)
groups = relationship("UserGroup", secondary=user_group_link, back_populates="users")