class SystemFertilizer(db.Model): __tablename__ = 'systemfertilizer' id = db.Column(db.Integer, primary_key=True) fertilizer_name = db.Column(db.Text, nullable=True) fertilizer_image = db.Column(db.String(255), nullable=True) fertilizer_document = db.Column(db.String(255), nullable=True) fertilizer_descreption = db.Column(db.Text, nullable=True) fertilizer_main_type_name = db.Column(db.Text, nullable=True) fertilizer_sub_type_name = db.Column(db.Text, nullable=True) fertilizer_user_instructons = db.Column(db.Text, nullable=True) fertilizer_matter = db.Column(db.Text, nullable=True) systemfertilizertyeps_id = db.Column( db.Integer(), db.ForeignKey('systemfertilizertyeps.id')) fertilizermatter_id = db.Column(db.Integer(), db.ForeignKey('fertilizermatter.id')) systemsubfertilizertyeps_id = db.Column( db.Integer(), db.ForeignKey('systemsubfertilizertyeps.id')) user_id = db.Column(db.Integer, db.ForeignKey('user.id')) created_timestamp = db.Column(db.DateTime, default=datetime.now) modified_timestamp = db.Column(db.DateTime, default=datetime.now, onupdate=datetime.now) systemcommonfertilizerplan = db.relationship('SystemCommonFertilizerPlan', backref='systemFertilizer') farmfertilizerplan = db.relationship('FarmFertilizerPlan', backref='systemFertilizer') farm_fertilizer_results = db.relationship('FarmFertilizerResults', backref='systemFertilizer')
class SystemSubFertilizerTypes(db.Model): __tablename__ = 'systemsubfertilizertyeps' id = db.Column(db.Integer, primary_key=True) sub_fertilizer_type = db.Column(db.Text, nullable=True) user_id = db.Column(db.Integer, db.ForeignKey('user.id')) systemFertilizer = db.relationship('SystemFertilizer', backref='systemsubfertilizertyeps') systemfertilizertyeps_id = db.Column( db.Integer(), db.ForeignKey('systemfertilizertyeps.id')) fertilizermatter_id = db.Column(db.Integer(), db.ForeignKey('fertilizermatter.id')) created_timestamp = db.Column(db.DateTime, default=datetime.now) modified_timestamp = db.Column(db.DateTime, default=datetime.now, onupdate=datetime.now) farm_fertilizer_results = db.relationship( 'FarmFertilizerResults', backref='systemsubfertilizertyeps')
class ImportantTrait(db.Model): id = db.Column(db.Integer, primary_key=True) traits_name = db.Column(db.Text, nullable=True) traits_descreption = db.Column(db.Text, nullable=True) syssubcategory_id = db.Column(db.Integer(), db.ForeignKey('syssubcategory.id')) user_id = db.Column(db.Integer, db.ForeignKey('user.id')) created_timestamp = db.Column(db.DateTime, default=datetime.now) modified_timestamp = db.Column(db.DateTime, default=datetime.now, onupdate=datetime.now)
class QulityCharacteristic(db.Model): id = db.Column(db.Integer, primary_key=True) characteristic_name = db.Column(db.Text, nullable=True) characteristic_descreption = db.Column(db.Text, nullable=True) syssubcategory_id = db.Column(db.Integer(), db.ForeignKey('syssubcategory.id')) user_id = db.Column(db.Integer, db.ForeignKey('user.id')) created_timestamp = db.Column(db.DateTime, default=datetime.now) modified_timestamp = db.Column(db.DateTime, default=datetime.now, onupdate=datetime.now)
class Maturity(db.Model): id = db.Column(db.Integer, primary_key=True) seson_name = db.Column(db.Text, nullable=True) num_of_date = db.Column(db.String(255), nullable=True) syssubcategory_id = db.Column(db.Integer(), db.ForeignKey('syssubcategory.id')) user_id = db.Column(db.Integer, db.ForeignKey('user.id')) created_timestamp = db.Column(db.DateTime, default=datetime.now) modified_timestamp = db.Column(db.DateTime, default=datetime.now, onupdate=datetime.now)
class CropSeason(db.Model): __tablename__ = 'cropseason' id = db.Column(db.Integer, primary_key=True) season_name = db.Column(db.Text, nullable=True) crop_name = db.Column(db.Text, nullable=True) variety_name = db.Column(db.Text, nullable=True) syscrop_id = db.Column(db.Integer(), db.ForeignKey('syscrop.id')) user_id = db.Column(db.Integer, db.ForeignKey('user.id')) created_timestamp = db.Column(db.DateTime, default=datetime.now) modified_timestamp = db.Column(db.DateTime, default=datetime.now, onupdate=datetime.now)
class FarmFertilizerPlan(db.Model): __tablename__ = 'farmfertilizerplan' id = db.Column(db.Integer, primary_key=True) crop_age_range = db.Column(db.Text, nullable=True) fertilizer_need_time = db.Column(db.Text, nullable=True) fertilizer_name = db.Column(db.Text, nullable=True) fertilizer_amount = db.Column(db.Text, nullable=True) sys_crop_category_name = db.Column(db.Text, nullable=True) sys_sub_crop_category_name = db.Column(db.Text, nullable=True) syscrop_id = db.Column(db.Integer(), db.ForeignKey('syscrop.id')) syssubcategory_id = db.Column(db.Integer(), db.ForeignKey('syssubcategory.id')) user_id = db.Column(db.Integer, db.ForeignKey('user.id')) created_timestamp = db.Column(db.DateTime, default=datetime.now) modified_timestamp = db.Column(db.DateTime, default=datetime.now, onupdate=datetime.now) farm_id = db.Column(db.Integer, db.ForeignKey('farm.id')) fertilizer_need_time_name = db.Column(db.Text, nullable=True) systemfertilizer_id = db.Column(db.Integer, db.ForeignKey('systemfertilizer.id')) production_type = db.Column(db.String(255), nullable=True) season_id = db.Column(db.Integer)
class SubCatYield(db.Model): id = db.Column(db.Integer, primary_key=True) highest_yield_recorded = db.Column(db.String(255), nullable=True) average_yield = db.Column(db.String(255), nullable=True) average_yield_yla = db.Column(db.String(255), nullable=True) average_yield_mha = db.Column(db.String(255), nullable=True) reaction_to_salinity = db.Column(db.String(255), nullable=True) syssubcategory_id = db.Column(db.Integer(), db.ForeignKey('syssubcategory.id')) user_id = db.Column(db.Integer, db.ForeignKey('user.id')) created_timestamp = db.Column(db.DateTime, default=datetime.now) modified_timestamp = db.Column(db.DateTime, default=datetime.now, onupdate=datetime.now)
class ReactionToInsectPest(db.Model): id = db.Column(db.Integer, primary_key=True) diseasese_name = db.Column(db.Text, nullable=True) syssubcategory_id = db.Column(db.Integer(), db.ForeignKey('syssubcategory.id')) user_id = db.Column(db.Integer, db.ForeignKey('user.id')) created_timestamp = db.Column(db.DateTime, default=datetime.now) modified_timestamp = db.Column(db.DateTime, default=datetime.now, onupdate=datetime.now) resistant = db.Column(db.Boolean) moderately_resistant = db.Column(db.Boolean) susceptible = db.Column(db.Boolean) moderately_susceptible = db.Column(db.Boolean) system_pest_and_diseases_id = db.Column(db.Integer) syssubcategory_name = db.Column(db.Text, nullable=True)
class Crop(db.Model): id = db.Column(db.Integer, primary_key=True) cropeName = db.Column(db.Text, nullable=False) cropImage = db.Column(db.String(255), nullable=True) farm_id = db.Column(db.Integer, db.ForeignKey('farm.id')) farms = db.relationship('Farm', secondary=farm_crops, backref='crop') harvest = db.relationship('Harvest', backref='crop') pestdisease = db.relationship('Pestdisease', backref='crop') created_timestamp = db.Column(db.DateTime, default=datetime.now) modified_timestamp = db.Column(db.DateTime, default=datetime.now, onupdate=datetime.now) sys_sub_crop_id = db.Column(db.Integer(), db.ForeignKey('syssubcategory.id')) production_type = db.Column(db.String(255), nullable=True) panting_unit = db.Column(db.String(255), nullable=True) crop_surface_on_farm = db.Column(db.String(255), nullable=True)
class SysSubCategory(db.Model): __tablename__ = 'syssubcategory' id = db.Column(db.Integer, primary_key=True) variety_name = db.Column(db.Text, nullable=True) line_designation = db.Column(db.Text, nullable=True) pedgiree = db.Column(db.Text, nullable=True) origin = db.Column(db.Text, nullable=True) method_of_propagation = db.Column(db.Text, nullable=True) syscrop_id = db.Column(db.Integer(), db.ForeignKey('syscrop.id')) sub_cat_yield = db.relationship('SubCatYield', backref='syssubcategory', uselist=False) maturity = db.relationship('Maturity', backref='syssubcategory', uselist=False) importanttrait = db.relationship('ImportantTrait', backref='syssubcategory', uselist=False) reactiontodisease = db.relationship('ReactionToDisease', backref='syssubcategory', uselist=False) reactiontoinsectpest = db.relationship('ReactionToInsectPest', backref='syssubcategory', uselist=False) qulitycharacteristic = db.relationship('QulityCharacteristic', backref='syssubcategory', uselist=False) farmfertilizerplan = db.relationship('FarmFertilizerPlan', backref='syssubcategory') user_id = db.Column(db.Integer, db.ForeignKey('user.id')) created_timestamp = db.Column(db.DateTime, default=datetime.now) modified_timestamp = db.Column(db.DateTime, default=datetime.now, onupdate=datetime.now) sub_crop_image = db.Column(db.String(255), nullable=True) crops = db.relationship('Crop', backref='syssubcategory') farm_fertilizer_results = db.relationship('FarmFertilizerResults', backref='syssubcategory') farm_pest_details = db.relationship('Farm_pest_details', backref='syssubcategory')