mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-02-04 14:18:22 +00:00
Add authorisation models.
Add EventAuthorisation model + migrations Add authorised property to Event. Add appropriate tests
This commit is contained in:
28
RIGS/migrations/0025_eventauthorisation.py
Normal file
28
RIGS/migrations/0025_eventauthorisation.py
Normal file
@@ -0,0 +1,28 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('RIGS', '0024_auto_20160229_2042'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='EventAuthorisation',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('email', models.EmailField(max_length=254)),
|
||||
('name', models.CharField(max_length=255)),
|
||||
('uni_id', models.CharField(max_length=10, null=True, verbose_name=b'University ID', blank=True)),
|
||||
('account_code', models.CharField(max_length=50, null=True, blank=True)),
|
||||
('po', models.CharField(max_length=255, null=True, verbose_name=b'purchase order', blank=True)),
|
||||
('amount', models.DecimalField(verbose_name=b'authorisation amount', max_digits=10, decimal_places=2)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('event', models.ForeignKey(related_name='authroisations', to='RIGS.Event')),
|
||||
],
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user