From 22fb6a357f1b6b91f04a180604e2f992280ee661 Mon Sep 17 00:00:00 2001 From: clarkzjw Date: Tue, 21 Feb 2023 16:46:11 -0800 Subject: add django app template --- bot/models.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 bot/models.py (limited to 'bot/models.py') diff --git a/bot/models.py b/bot/models.py new file mode 100644 index 0000000..c6df3e7 --- /dev/null +++ b/bot/models.py @@ -0,0 +1,9 @@ +from django.contrib.auth.models import AbstractUser +from django.db import models + + +class User(AbstractUser): + name = models.CharField(max_length=50, blank=True) + telegram_id = models.PositiveBigIntegerField(unique=True, primary_key=True) + username = models.CharField(max_length=32, blank=False) + USERNAME_FIELD = 'telegram_id' -- cgit v1.2.3