from django.db import models

# Create your models here.
# 클래스의 기능: 상속
class Question(models.Model): # Table
    question_text= models.CharField(max_length= 100) # column, datatype
    public_date= models.CharField(max_length= 100)
    votes= models.DecimalField(max_digits= 20, decimal_places= 10)
# 위의 2개 타입으로 클래스 만들면 ok
# link, string-> CharField, data-> DecimalField
# 보통 max_length= 100으로 함

class Economics(models.Model):
    title= models.CharField(max_length= 100)
    href= models.CharField(max_length= 100)
    create_date= models.CharField(max_length= 100)

[((128, 160), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(100)'}), '(max_length=100)\n', (144, 160), False, 'from django.db import models\n'), ((198, 230), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(100)'}), '(max_length=100)\n', (214, 230), False, 'from django.db import models\n'), ((243, 296), 'django.db.models.DecimalField', 'models.DecimalField', ([], {'max_digits': '(20)', 'decimal_places': '(10)'}), '(max_digits=20, decimal_places=10)\n', (262, 296), False, 'from django.db import models\n'), ((439, 471), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(100)'}), '(max_length=100)\n', (455, 471), False, 'from django.db import models\n'), ((483, 515), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(100)'}), '(max_length=100)\n', (499, 515), False, 'from django.db import models\n'), ((534, 566), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(100)'}), '(max_length=100)\n', (550, 566), False, 'from django.db import models\n')]