Fakultas Ilmu Komputer UI

Commit 319f2c62 authored by Zamil Majdy's avatar Zamil Majdy
Browse files

[#140818877] [#39] [Green] implementations to change verified to status on company entity

parent 7d064006
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-05-02 02:25
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0011_merge_20170425_2214'),
]
operations = [
migrations.AlterModelOptions(
name='company',
options={'ordering': ['-updated']},
),
migrations.AlterModelOptions(
name='student',
options={'ordering': ['-updated']},
),
migrations.AlterModelOptions(
name='supervisor',
options={'ordering': ['-updated']},
),
migrations.AlterModelOptions(
name='vacancy',
options={'ordering': ['-updated']},
),
migrations.RemoveField(
model_name='company',
name='verified',
),
migrations.AddField(
model_name='company',
name='status',
field=models.IntegerField(default=0),
),
]
......@@ -75,16 +75,23 @@ class Student(models.Model):
def __unicode__(self):
return u"Student {}".format(get_display_name(self.user))
class Meta:
ordering = ['-updated']
class Company(models.Model):
"""
A user subclass
"""
NEW = 0
UNVERIFIED = 1
VERIFIED = 2
created = models.DateTimeField(auto_now_add=True)
updated = models.DateTimeField(auto_now=True)
user = models.OneToOneField(User)
description = models.TextField()
verified = models.BooleanField(default=False)
status = models.IntegerField(default=NEW)
logo = models.FileField(upload_to=get_company_logo_file_path, null=True, blank=True)
address = models.CharField(max_length=1000, blank=True, null=True)
......@@ -95,6 +102,9 @@ class Company(models.Model):
def __unicode__(self):
return u"Company {}".format(get_display_name(self.user))
class Meta:
ordering = ['-updated']
class Supervisor(models.Model):
"""
......@@ -111,3 +121,6 @@ class Supervisor(models.Model):
def __unicode__(self):
return u"Supervisor {}".format(get_display_name(self.user))
class Meta:
ordering = ['-updated']
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment