crappy
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
from sqlalchemy import Column, Integer, String, ForeignKey, Double
|
||||
from sqlalchemy.orm import relationship
|
||||
from sqlalchemy.orm import relationship, mapped_column, Mapped
|
||||
|
||||
from models import BaseModel
|
||||
|
||||
|
||||
class Service(BaseModel):
|
||||
__tablename__ = 'services'
|
||||
id = Column(Integer, autoincrement=True, primary_key=True, index=True)
|
||||
id: Mapped[int] = mapped_column(Integer, autoincrement=True, primary_key=True, index=True)
|
||||
name = Column(String, nullable=False, comment='Название услуги')
|
||||
|
||||
category_id = Column(Integer, ForeignKey('service_categories.id'), nullable=False, comment='ID категории услуги')
|
||||
|
||||
Reference in New Issue
Block a user