from django.db import models
from django.utils.translation import gettext_lazy as _


class PythonTipTweetUser(models.Model):
    user_id = models.PositiveBigIntegerField(
        verbose_name=_('Tweet user ID'),
        unique=True
    )
    username = models.CharField(
        max_length=255,
        verbose_name=_('Username'),
        db_index=True
    )
    display_name = models.CharField(
        max_length=255,
        verbose_name=_('Username'),
    )

    def save(self, *args, **kwargs):
        if not self.display_name:
            self.display_name = self.username
        super().save(*args, **kwargs)

    class Meta:
        verbose_name = _('Tweet User')
        indexes = [
            models.Index(fields=['user_id', 'username'], name='idx_id_username')
        ]

    def __str__(self):
        return f'@{self.username}'

d6d98bac4152478a5eff58909a26cb237270b68b
<mask token>


class PythonTipTweetUser(models.Model):
    <mask token>
    <mask token>
    <mask token>
    <mask token>


    class Meta:
        verbose_name = _('Tweet User')
        indexes = [models.Index(fields=['user_id', 'username'], name=
            'idx_id_username')]
    <mask token>

<mask token>


class PythonTipTweetUser(models.Model):
    <mask token>
    <mask token>
    <mask token>

    def save(self, *args, **kwargs):
        if not self.display_name:
            self.display_name = self.username
        super().save(*args, **kwargs)


    class Meta:
        verbose_name = _('Tweet User')
        indexes = [models.Index(fields=['user_id', 'username'], name=
            'idx_id_username')]

    def __str__(self):
        return f'@{self.username}'

<mask token>


class PythonTipTweetUser(models.Model):
    user_id = models.PositiveBigIntegerField(verbose_name=_('Tweet user ID'
        ), unique=True)
    username = models.CharField(max_length=255, verbose_name=_('Username'),
        db_index=True)
    display_name = models.CharField(max_length=255, verbose_name=_('Username'))

    def save(self, *args, **kwargs):
        if not self.display_name:
            self.display_name = self.username
        super().save(*args, **kwargs)


    class Meta:
        verbose_name = _('Tweet User')
        indexes = [models.Index(fields=['user_id', 'username'], name=
            'idx_id_username')]

    def __str__(self):
        return f'@{self.username}'

from django.db import models
from django.utils.translation import gettext_lazy as _


class PythonTipTweetUser(models.Model):
    user_id = models.PositiveBigIntegerField(verbose_name=_('Tweet user ID'
        ), unique=True)
    username = models.CharField(max_length=255, verbose_name=_('Username'),
        db_index=True)
    display_name = models.CharField(max_length=255, verbose_name=_('Username'))

    def save(self, *args, **kwargs):
        if not self.display_name:
            self.display_name = self.username
        super().save(*args, **kwargs)


    class Meta:
        verbose_name = _('Tweet User')
        indexes = [models.Index(fields=['user_id', 'username'], name=
            'idx_id_username')]

    def __str__(self):
        return f'@{self.username}'

from django.db import models
from django.utils.translation import gettext_lazy as _


class PythonTipTweetUser(models.Model):
    user_id = models.PositiveBigIntegerField(
        verbose_name=_('Tweet user ID'),
        unique=True
    )
    username = models.CharField(
        max_length=255,
        verbose_name=_('Username'),
        db_index=True
    )
    display_name = models.CharField(
        max_length=255,
        verbose_name=_('Username'),
    )

    def save(self, *args, **kwargs):
        if not self.display_name:
            self.display_name = self.username
        super().save(*args, **kwargs)

    class Meta:
        verbose_name = _('Tweet User')
        indexes = [
            models.Index(fields=['user_id', 'username'], name='idx_id_username')
        ]

    def __str__(self):
        return f'@{self.username}'
