update docs part 1
This commit is contained in:
@ -8,12 +8,13 @@ metadata = sqlalchemy.MetaData()
|
||||
|
||||
|
||||
class Course(ormar.Model):
|
||||
# if you omit this parameter it will be created automatically
|
||||
# as class.__name__.lower()+'s' -> "courses" in this example
|
||||
__tablename__ = "my_courses"
|
||||
__database__ = database
|
||||
__metadata__ = metadata
|
||||
class Meta:
|
||||
# if you omit this parameter it will be created automatically
|
||||
# as class.__name__.lower()+'s' -> "courses" in this example
|
||||
tablename = "my_courses"
|
||||
database = database
|
||||
metadata = metadata
|
||||
|
||||
id = ormar.Integer(primary_key=True)
|
||||
name = ormar.String(length=100)
|
||||
completed = ormar.Boolean(default=False)
|
||||
id: ormar.Integer(primary_key=True)
|
||||
name: ormar.String(max_length=100)
|
||||
completed: ormar.Boolean(default=False)
|
||||
|
||||
Reference in New Issue
Block a user