27 lines
667 B
Python
27 lines
667 B
Python
from sqlalchemy import Column, JSON, String, Text, BigInteger, Date
|
|
|
|
from models.base import AuditBase
|
|
|
|
|
|
class Patches(AuditBase):
|
|
name = Column(String(100), nullable=False)
|
|
location = Column(String(200))
|
|
status = Column(String(50))
|
|
|
|
|
|
class Crops(AuditBase):
|
|
patch_id = Column(BigInteger, nullable=False)
|
|
name = Column(String(100), nullable=False)
|
|
variety = Column(String(100))
|
|
date = Column(Date)
|
|
|
|
|
|
class Records(AuditBase):
|
|
crop_id = Column(BigInteger, nullable=False)
|
|
type = Column(String(50))
|
|
date = Column(Date)
|
|
content = Column(Text)
|
|
images = Column(JSON)
|
|
videos = Column(JSON)
|
|
stage = Column(String(50))
|