You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
814 B
Python
18 lines
814 B
Python
3 years ago
|
from django.db import models
|
||
|
|
||
|
from konova.models import BaseResource
|
||
|
from organisation.enums import OrganisationTypeEnum
|
||
|
|
||
|
|
||
|
class Organisation(BaseResource):
|
||
|
name = models.CharField(max_length=500, unique=True)
|
||
|
address = models.CharField(max_length=500, null=True, blank=True)
|
||
|
city = models.CharField(max_length=500, null=True, blank=True)
|
||
|
postal_code = models.CharField(max_length=100, null=True, blank=True)
|
||
|
phone = models.CharField(max_length=500, null=True, blank=True)
|
||
|
email = models.EmailField(max_length=500, null=True, blank=True)
|
||
|
facsimile = models.CharField(max_length=500, null=True, blank=True)
|
||
|
type = models.CharField(max_length=255, choices=OrganisationTypeEnum.as_choices(drop_empty_choice=True), null=True, blank=True)
|
||
|
|
||
|
def __str__(self):
|
||
|
return self.name
|