feat: add full project - backend, frontend, docker, specs and configs
This commit is contained in:
parent
b77c7d5a01
commit
e6cb06255b
24489 changed files with 61341 additions and 36 deletions
18
backend/app/models/imobiliaria.py
Normal file
18
backend/app/models/imobiliaria.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
from app.extensions import db
|
||||
|
||||
|
||||
class Imobiliaria(db.Model):
|
||||
__tablename__ = "imobiliarias"
|
||||
|
||||
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
|
||||
name = db.Column(db.String(200), nullable=False)
|
||||
logo_url = db.Column(db.String(512), nullable=True)
|
||||
website = db.Column(db.String(512), nullable=True)
|
||||
is_active = db.Column(db.Boolean, nullable=False, default=True)
|
||||
display_order = db.Column(db.Integer, nullable=False, default=0)
|
||||
created_at = db.Column(db.DateTime, nullable=False, server_default=db.func.now())
|
||||
|
||||
properties = db.relationship("Property", backref="imobiliaria", lazy="dynamic")
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"<Imobiliaria {self.name!r}>"
|
||||
Loading…
Add table
Add a link
Reference in a new issue