Merge branch 'master' of http://git.jkhsakha.ru/VinokurovVE/service-app
This commit is contained in:
0
isjkhrs/general/__init__.py
Normal file
0
isjkhrs/general/__init__.py
Normal file
0
isjkhrs/general/models/__init__.py
Normal file
0
isjkhrs/general/models/__init__.py
Normal file
24
isjkhrs/general/models/general.py
Normal file
24
isjkhrs/general/models/general.py
Normal file
@ -0,0 +1,24 @@
|
||||
from sqlalchemy import Boolean, Column, ForeignKey, Integer, String
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
from databases.mssql.database import Base
|
||||
|
||||
|
||||
class Region(Base):
|
||||
__tablename__ = "regions"
|
||||
|
||||
id = Column( Integer, primary_key= True, index= True)
|
||||
name = Column(String(255))
|
||||
active = Column(Boolean, default=True)
|
||||
|
||||
|
||||
|
||||
class City(Base):
|
||||
__tablename__ = "cities"
|
||||
|
||||
id = Column(Integer, autoincrement= True, primary_key= True, index= True)
|
||||
name = Column(String(255))
|
||||
region_id = Column(Integer, ForeignKey(regions.id))
|
||||
active = Column(Boolean, default= True)
|
||||
|
||||
|
0
isjkhrs/general/repository/__init__.py
Normal file
0
isjkhrs/general/repository/__init__.py
Normal file
0
isjkhrs/general/schemas/__init__.py
Normal file
0
isjkhrs/general/schemas/__init__.py
Normal file
3
isjkhrs/general/schemas/general.py
Normal file
3
isjkhrs/general/schemas/general.py
Normal file
@ -0,0 +1,3 @@
|
||||
from typing import List, Optional
|
||||
|
||||
from pydantic import BaseModel
|
Reference in New Issue
Block a user