from main import db
from datetime import datetime


class StockModel(db.Model):
    __tablename__ = 'new_stock'
    id = db.Column(db.Integer, primary_key=True)
    stock = db.Column(db.Integer)
    created_at = db.Column(db.String(100), default=datetime.now())
    inv_id = db.Column(db.Integer, db.ForeignKey('inventories.id'))

    def add_stock(self):
        db.session.add(self)
        db.session.commit()

1598fa3124d97c0a730396aca359d3d2ea70b58e
<mask token>


class StockModel(db.Model):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

<mask token>


class StockModel(db.Model):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    def add_stock(self):
        db.session.add(self)
        db.session.commit()

<mask token>


class StockModel(db.Model):
    __tablename__ = 'new_stock'
    id = db.Column(db.Integer, primary_key=True)
    stock = db.Column(db.Integer)
    created_at = db.Column(db.String(100), default=datetime.now())
    inv_id = db.Column(db.Integer, db.ForeignKey('inventories.id'))

    def add_stock(self):
        db.session.add(self)
        db.session.commit()

from main import db
from datetime import datetime


class StockModel(db.Model):
    __tablename__ = 'new_stock'
    id = db.Column(db.Integer, primary_key=True)
    stock = db.Column(db.Integer)
    created_at = db.Column(db.String(100), default=datetime.now())
    inv_id = db.Column(db.Integer, db.ForeignKey('inventories.id'))

    def add_stock(self):
        db.session.add(self)
        db.session.commit()
