2017-06-11 23:34:13 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
2017-06-30 01:25:07 +00:00
|
|
|
# Generated by Django 1.11.2 on 2017-06-28 10:30
|
2017-06-11 23:34:13 +00:00
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
2017-06-30 01:25:07 +00:00
|
|
|
from django.conf import settings
|
2017-06-11 23:34:13 +00:00
|
|
|
from django.db import migrations, models
|
|
|
|
import django.db.models.deletion
|
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
2017-06-30 01:25:07 +00:00
|
|
|
initial = True
|
|
|
|
|
2017-06-11 23:34:13 +00:00
|
|
|
dependencies = [
|
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='User',
|
|
|
|
fields=[
|
2017-06-30 01:25:07 +00:00
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
2017-06-11 23:34:13 +00:00
|
|
|
('password', models.CharField(max_length=128, verbose_name='password')),
|
2017-06-30 01:25:07 +00:00
|
|
|
('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
|
2017-06-11 23:34:13 +00:00
|
|
|
('name', models.CharField(max_length=255)),
|
|
|
|
('surname', models.CharField(max_length=255)),
|
2017-06-30 01:25:07 +00:00
|
|
|
('email', models.EmailField(blank=True, max_length=254, null=True)),
|
|
|
|
('telephone', models.CharField(blank=True, max_length=15, null=True)),
|
|
|
|
('adresse', models.CharField(blank=True, max_length=255, null=True)),
|
|
|
|
('maxemprunt', models.IntegerField(default=5)),
|
|
|
|
('state', models.IntegerField(choices=[(0, 'STATE_ACTIVE'), (1, 'STATE_DISABLED'), (2, 'STATE_ARCHIVE')], default=0)),
|
|
|
|
('pseudo', models.CharField(help_text='Doit contenir uniquement des lettres, chiffres, ou tirets. ', max_length=32, unique=True)),
|
|
|
|
('comment', models.CharField(blank=True, help_text='Commentaire, promo', max_length=255)),
|
2017-06-11 23:34:13 +00:00
|
|
|
('registered', models.DateTimeField(auto_now_add=True)),
|
2017-06-30 01:25:07 +00:00
|
|
|
('right', models.IntegerField(choices=[(0, 'BASIC'), (1, 'PERM'), (2, 'BUREAU')], default=0)),
|
2017-06-11 23:34:13 +00:00
|
|
|
],
|
|
|
|
options={
|
|
|
|
'abstract': False,
|
|
|
|
},
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='Request',
|
|
|
|
fields=[
|
2017-06-30 01:25:07 +00:00
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
('type', models.CharField(choices=[('PW', 'Mot de passe'), ('EM', 'Email')], max_length=2)),
|
2017-06-11 23:34:13 +00:00
|
|
|
('token', models.CharField(max_length=32)),
|
|
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
|
|
('expires_at', models.DateTimeField()),
|
|
|
|
('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
]
|