Barcode scanning and GTIN mapping
This commit is contained in:
+11
-1
@@ -41,7 +41,6 @@ class VariantPack(Base):
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
drug_variant_id = Column(Integer, ForeignKey("drug_variants.id"), nullable=False, index=True)
|
||||
label = Column(String, nullable=False)
|
||||
pack_unit_name = Column(String, nullable=False, default="pack")
|
||||
pack_size_in_base_units = Column(Float, nullable=False, default=1)
|
||||
is_active = Column(Boolean, nullable=False, default=True)
|
||||
@@ -109,6 +108,17 @@ class DispensingAllocation(Base):
|
||||
quantity = Column(Float, nullable=False)
|
||||
|
||||
|
||||
class GtinMapping(Base):
|
||||
__tablename__ = "gtin_mappings"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
gtin = Column(String(14), unique=True, index=True, nullable=False)
|
||||
drug_variant_id = Column(Integer, ForeignKey("drug_variants.id"), nullable=False, index=True)
|
||||
variant_pack_id = Column(Integer, ForeignKey("variant_packs.id"), nullable=False, index=True)
|
||||
created_by_user_id = Column(Integer, ForeignKey("users.id"), nullable=True)
|
||||
created_at = Column(DateTime(timezone=True), server_default=func.now())
|
||||
|
||||
|
||||
class AuditLog(Base):
|
||||
__tablename__ = "audit_logs"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user