feat: 新增物料/入库单实时 CLIP 向量提取(新建+更新),修复 I/O 延迟和路径解析静默失败
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
# app/models/inbound/product.py
|
||||
from app.extensions import db
|
||||
from pgvector.sqlalchemy import Vector
|
||||
import json
|
||||
from app.models.base import MaterialBase
|
||||
|
||||
@ -58,6 +59,9 @@ class StockProduct(db.Model):
|
||||
# 全局打印流水号
|
||||
global_print_id = db.Column(db.Integer)
|
||||
|
||||
# CLIP 视觉向量(用于以图搜图)
|
||||
arrival_image_embedding = db.Column(Vector(512), nullable=True)
|
||||
|
||||
# 关系定义
|
||||
base = db.relationship('MaterialBase', back_populates='stock_products')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user