Add Dog model
This commit is contained in:
parent
74d93ee1b8
commit
28e3e8b41d
@ -1,9 +1,7 @@
|
||||
from sqlalchemy import Column, String, Integer, Boolean, DateTime, ForeignKey
|
||||
from sqlalchemy.orm import relationship
|
||||
from sqlalchemy import Column, String, Integer, Boolean, DateTime
|
||||
from sqlalchemy.sql import func
|
||||
from core.database import Base
|
||||
import uuid
|
||||
from datetime import datetime
|
||||
|
||||
class Dog(Base):
|
||||
__tablename__ = "dogs"
|
||||
@ -12,11 +10,9 @@ class Dog(Base):
|
||||
breed = Column(String, nullable=False)
|
||||
age = Column(Integer)
|
||||
color = Column(String)
|
||||
weight = Column(Float)
|
||||
weight = Column(Integer)
|
||||
is_vaccinated = Column(Boolean, default=False)
|
||||
microchip_number = Column(String, unique=True)
|
||||
gender = Column(String)
|
||||
is_neutered = Column(Boolean, default=False)
|
||||
description = Column(String)
|
||||
owner_name = Column(String)
|
||||
owner_contact = Column(String)
|
||||
created_at = Column(DateTime, default=func.now())
|
||||
updated_at = Column(DateTime, default=func.now(), onupdate=func.now())
|
Loading…
x
Reference in New Issue
Block a user