"> Issues 0 Pull Requests 0 Commits 895 Releases 0

No Description

models.py 2.7KB

    # -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from django_models_ext import BaseModelMixin from shortuuidfield import ShortUUIDField class ScreenAdminInfo(BaseModelMixin): MALE = 1 FEMALE = 0 SEX_TYPE_TUPLE = ( (MALE, u'男'), (FEMALE, u'女'), ) ACTIVATED = 1 DISABLED = 2 DELETED = 3 USER_STATUS_TUPLE = ( (ACTIVATED, u'已激活'), (DISABLED, u'已禁用'), (DELETED, u'已删除'), ) admin_id = ShortUUIDField(_(u'admin_id'), max_length=32, blank=True, null=True, help_text=u'大屏管理员唯一标识', db_index=True, unique=True) unionid = models.CharField(_(u'unionid'), max_length=32, blank=True, null=True, help_text=u'微信 Union ID', db_index=True) openid = models.CharField(_(u'openid'), max_length=32, blank=True, null=True, help_text=u'微信 Open ID', db_index=True) name = models.CharField(_(u'name'), max_length=8, blank=True, null=True, help_text=u'用户姓名') sex = models.IntegerField(_(u'sex'), choices=SEX_TYPE_TUPLE, default=MALE, help_text=u'用户性别') nickname = models.CharField(_(u'nickname'), max_length=255, blank=True, null=True, help_text=u'用户昵称') avatar = models.CharField(_(u'avatar'), max_length=255, blank=True, null=True, help_text=u'用户头像') phone = models.CharField(_(u'phone'), max_length=11, blank=True, null=True, help_text=u'用户电话', db_index=True) country = models.CharField(_(u'country'), max_length=16, blank=True, null=True, help_text=u'用户国家') province = models.CharField(_(u'province'), max_length=16, blank=True, null=True, help_text=u'用户省份') city = models.CharField(_(u'city'), max_length=16, blank=True, null=True, help_text=u'用户城市') location = models.CharField(_(u'location'), max_length=255, blank=True, null=True, help_text=u'用户地址') brand_id = models.CharField(_(u'brand_id'), max_length=32, blank=True, null=True, help_text=u'品牌唯一标识', db_index=True) brand_name = models.CharField(_(u'brand_name'), max_length=255, blank=True, null=True, help_text=u'品牌名称') user_status = models.IntegerField(_(u'user_status'), choices=USER_STATUS_TUPLE, default=ACTIVATED, help_text=u'管理员状态', db_index=True) class Meta: verbose_name = _(u'ScreenAdminInfo') verbose_name_plural = _(u'ScreenAdminInfo') unique_together = ( ('brand_id', 'unionid', 'openid'), ) def __unicode__(self): return unicode(self.pk) @property def data(self): return { 'nickname': self.nickname, 'avatar': self.avatar, }
kodo - Gogs: Go Git Service

Nenhuma Descrição

huangqimin001: 3e9628d0c9 iSort & Pycodestyle 6 anos atrás
..
algorithm f38d3bf980 Caesar Alg 8 anos atrás
error b6e7d9b08c :bug: Fix Bug: cannot import name ParamStatusCode 6 anos atrás
redis 6001a58bda :bug: Update user info by select_for_update 6 anos atrás
sql f3cf68f957 Add PAI2_HOME_WX_API for request.weixin 9 anos atrás
zbar 3e9628d0c9 iSort & Pycodestyle 6 anos atrás
__init__.py 52ce35cbfc add api uuid_init/uuid 11 anos atrás
admin_utils.py 9e4ac4fd3b Add admin_status for GroupUserInfo 9 anos atrás
disk_utils.py af2b3f483f change download.html to be generated from download.tmpl.html 10 anos atrás
group_photo_utils.py 0e7b5eb1af Update order_by of group session photos 9 anos atrás
message_utils.py 21b4a5403a add api lensman_brief_api 10 anos atrás
original_CGzC_10a50000c8811190.bak.jpg 290ff6960f pyzbar 7 anos atrás
original_CGzC_10a50000c8811190.jpg 680f424408 Update water mark 9 anos atrás
paiai_96_96.png 4a8b4f8819 add watermark 11 anos atrás
paiai_water_mark.png 680f424408 Update water mark 9 anos atrás
price_utils.py 24e345a32f Add price func get_group_photo_price 9 anos atrás
qiniucdn.py 4ce7f5c87b :art: Member Relative APIs 7 anos atrás
rdm_utils.py 4efb7f6f87 Statistic 8 anos atrás
storage_qiniu_utils.py f2fc73685d Update package django_xxx 8 anos atrás
storage_utils.py f2fc73685d Update package django_xxx 8 anos atrás
thumbnail_utils.py 5c9e21b29b add Only Once Function statistic_thumbnail_size to statistic thumbnail size 10 anos atrás
time_utils.py 511533855d Change oauth to use http 9 anos atrás
url_utils.py 135c21b40c from models_ext import BaseModelMixin, upload_file_url, upload_path 8 anos atrás
version_utils.py 13816e8774 Fix Bug: REQUEST 8 anos atrás
watermark_utils.py 5411626ebe Change watermark position 9 anos atrás
wx_utils.py 32a7d9ffa0 Update wx relative 9 anos atrás