Files
FlightGrid/simulator/models/aerodrome.py

13 lines
396 B
Python

from django.db import models
class Aerodrome(models.Model):
icao = models.CharField(max_length=4, unique=True)
iata = models.CharField(max_length=3, unique=True, blank=True, null=True)
name = models.CharField(max_length=100)
city = models.CharField(max_length=100)
country = models.CharField(max_length=3)
def __str__(self):
return f"{self.icao} - {self.city}"