From 12ca493c6143be91c0331f74568890f2ade3a74d Mon Sep 17 00:00:00 2001 From: SunYF <123@hard_man.com> Date: Mon, 21 Sep 2026 15:28:14 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E5=8D=95=E5=85=B3=E8=81=94=E3=80=81=E5=9F=BA=E7=A1=80=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=BC=98=E5=8C=96=E4=B8=8E=E5=85=A5=E5=BA=93=E5=8D=95?= =?UTF-8?q?=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 新增出库单检测单号字段并添加索引支持溯源 2. 优化基础数据页面物料类型展示与选择逻辑 3. 升级入库单导入功能,支持自动生成单号并返回导入结果 4. 优化接驳台查询排序方式 5. 修复字符串拼接空格问题 --- .../internal/handler/production/dock.go | 4 +- bj_power_wms/agvtask/agvtask.go | 178 ++ bj_power_wms/agvtask/where.go | 854 +++++++ bj_power_wms/attachment/attachment.go | 178 ++ bj_power_wms/attachment/where.go | 1059 ++++++++ bj_power_wms/ent/migrate/schema.go | 6 + bj_power_wms/ent/mutation.go | 75 +- bj_power_wms/ent/outboundorder.go | 13 +- .../ent/outboundorder/outboundorder.go | 8 + bj_power_wms/ent/outboundorder/where.go | 80 + bj_power_wms/ent/outboundorder_create.go | 78 + bj_power_wms/ent/outboundorder_update.go | 52 + bj_power_wms/ent/runtime.go | 2 +- bj_power_wms/enttest/enttest.go | 85 + bj_power_wms/eventlog/eventlog.go | 111 + bj_power_wms/eventlog/where.go | 474 ++++ bj_power_wms/frontend/src/pages/BaseData.vue | 13 +- bj_power_wms/frontend/src/pages/Inbound.vue | 29 +- .../frontend/src/pages/Inspection.vue | 171 +- bj_power_wms/frontend/src/pages/Outbound.vue | 23 +- bj_power_wms/go.sum | 6 + bj_power_wms/hook/hook.go | 438 ++++ bj_power_wms/inbounddetail/inbounddetail.go | 94 + bj_power_wms/inbounddetail/where.go | 459 ++++ bj_power_wms/inboundorder/inboundorder.go | 230 ++ bj_power_wms/inboundorder/where.go | 1584 ++++++++++++ .../inspectionrecord/inspectionrecord.go | 250 ++ bj_power_wms/inspectionrecord/where.go | 1754 +++++++++++++ bj_power_wms/internal/db/db.go | 27 + bj_power_wms/internal/handler/excel.go | 26 +- bj_power_wms/internal/handler/inbound.go | 108 +- bj_power_wms/internal/handler/inspection.go | 111 +- bj_power_wms/internal/handler/outbound.go | 39 +- bj_power_wms/internal/handler/routes.go | 1 + bj_power_wms/inventory/inventory.go | 316 +++ bj_power_wms/inventory/where.go | 2254 +++++++++++++++++ bj_power_wms/inventorylock/inventorylock.go | 130 + bj_power_wms/inventorylock/where.go | 689 +++++ bj_power_wms/material/material.go | 170 ++ bj_power_wms/material/where.go | 799 ++++++ bj_power_wms/materialdemand/materialdemand.go | 70 + bj_power_wms/materialdemand/where.go | 229 ++ bj_power_wms/migrate/migrate.go | 64 + bj_power_wms/migrate/schema.go | 856 +++++++ .../ordermaterialledger.go | 160 ++ bj_power_wms/ordermaterialledger/where.go | 844 ++++++ bj_power_wms/outbounddetail/outbounddetail.go | 102 + bj_power_wms/outbounddetail/where.go | 539 ++++ bj_power_wms/outboundorder/outboundorder.go | 270 ++ bj_power_wms/outboundorder/where.go | 2019 +++++++++++++++ bj_power_wms/permission/permission.go | 152 ++ bj_power_wms/permission/where.go | 744 ++++++ bj_power_wms/predicate/predicate.go | 70 + bj_power_wms/returnorder/returnorder.go | 194 ++ bj_power_wms/returnorder/where.go | 1109 ++++++++ bj_power_wms/role/role.go | 97 + bj_power_wms/role/where.go | 389 +++ bj_power_wms/runtime/runtime.go | 10 + bj_power_wms/schema/outbound_order.go | 3 + bj_power_wms/semifinished/semifinished.go | 122 + bj_power_wms/semifinished/where.go | 664 +++++ bj_power_wms/stocktakeitem/stocktakeitem.go | 172 ++ bj_power_wms/stocktakeitem/where.go | 1009 ++++++++ bj_power_wms/stocktakeorder/stocktakeorder.go | 156 ++ bj_power_wms/stocktakeorder/where.go | 869 +++++++ bj_power_wms/user/user.go | 138 + bj_power_wms/user/where.go | 734 ++++++ bj_power_wms/web/static/index.html | 2 +- bj_power_wms/zone/where.go | 984 +++++++ bj_power_wms/zone/zone.go | 152 ++ 70 files changed, 25782 insertions(+), 119 deletions(-) create mode 100644 bj_power_wms/agvtask/agvtask.go create mode 100644 bj_power_wms/agvtask/where.go create mode 100644 bj_power_wms/attachment/attachment.go create mode 100644 bj_power_wms/attachment/where.go create mode 100644 bj_power_wms/enttest/enttest.go create mode 100644 bj_power_wms/eventlog/eventlog.go create mode 100644 bj_power_wms/eventlog/where.go create mode 100644 bj_power_wms/hook/hook.go create mode 100644 bj_power_wms/inbounddetail/inbounddetail.go create mode 100644 bj_power_wms/inbounddetail/where.go create mode 100644 bj_power_wms/inboundorder/inboundorder.go create mode 100644 bj_power_wms/inboundorder/where.go create mode 100644 bj_power_wms/inspectionrecord/inspectionrecord.go create mode 100644 bj_power_wms/inspectionrecord/where.go create mode 100644 bj_power_wms/inventory/inventory.go create mode 100644 bj_power_wms/inventory/where.go create mode 100644 bj_power_wms/inventorylock/inventorylock.go create mode 100644 bj_power_wms/inventorylock/where.go create mode 100644 bj_power_wms/material/material.go create mode 100644 bj_power_wms/material/where.go create mode 100644 bj_power_wms/materialdemand/materialdemand.go create mode 100644 bj_power_wms/materialdemand/where.go create mode 100644 bj_power_wms/migrate/migrate.go create mode 100644 bj_power_wms/migrate/schema.go create mode 100644 bj_power_wms/ordermaterialledger/ordermaterialledger.go create mode 100644 bj_power_wms/ordermaterialledger/where.go create mode 100644 bj_power_wms/outbounddetail/outbounddetail.go create mode 100644 bj_power_wms/outbounddetail/where.go create mode 100644 bj_power_wms/outboundorder/outboundorder.go create mode 100644 bj_power_wms/outboundorder/where.go create mode 100644 bj_power_wms/permission/permission.go create mode 100644 bj_power_wms/permission/where.go create mode 100644 bj_power_wms/predicate/predicate.go create mode 100644 bj_power_wms/returnorder/returnorder.go create mode 100644 bj_power_wms/returnorder/where.go create mode 100644 bj_power_wms/role/role.go create mode 100644 bj_power_wms/role/where.go create mode 100644 bj_power_wms/runtime/runtime.go create mode 100644 bj_power_wms/semifinished/semifinished.go create mode 100644 bj_power_wms/semifinished/where.go create mode 100644 bj_power_wms/stocktakeitem/stocktakeitem.go create mode 100644 bj_power_wms/stocktakeitem/where.go create mode 100644 bj_power_wms/stocktakeorder/stocktakeorder.go create mode 100644 bj_power_wms/stocktakeorder/where.go create mode 100644 bj_power_wms/user/user.go create mode 100644 bj_power_wms/user/where.go create mode 100644 bj_power_wms/zone/where.go create mode 100644 bj_power_wms/zone/zone.go diff --git a/bj_power_mes/internal/handler/production/dock.go b/bj_power_mes/internal/handler/production/dock.go index ffd6204..f03836e 100644 --- a/bj_power_mes/internal/handler/production/dock.go +++ b/bj_power_mes/internal/handler/production/dock.go @@ -44,7 +44,7 @@ func dockRowOf(d *ent.Dock) dockRow { // ListDocksHandler GET /docks 接驳台全量列表(工位/排产/AGV 下拉真源,读本地 dock 表)。 func ListDocksHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { - list, err := svcCtx.EntClient.Dock.Query().Order(ent.Asc("dockCode")).All(r.Context()) + list, err := svcCtx.EntClient.Dock.Query().Order(dock.ByDockCode()).All(r.Context()) if err != nil { httpx.Fail(w, 3113, "查询接驳台失败:"+err.Error()) return @@ -107,7 +107,7 @@ func ListDocksMaintHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { // (WMS 出库目标工位下拉 / AGV 页接驳台列表;dock 真源已迁 MES)。X-API-TOKEN 保护。 func ListDocksInternalHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { - list, err := svcCtx.EntClient.Dock.Query().Order(ent.Asc("dockCode")).All(r.Context()) + list, err := svcCtx.EntClient.Dock.Query().Order(dock.ByDockCode()).All(r.Context()) if err != nil { httpx.Fail(w, 3113, "查询接驳台失败:"+err.Error()) return diff --git a/bj_power_wms/agvtask/agvtask.go b/bj_power_wms/agvtask/agvtask.go new file mode 100644 index 0000000..4a5ef5b --- /dev/null +++ b/bj_power_wms/agvtask/agvtask.go @@ -0,0 +1,178 @@ +// Code generated by ent, DO NOT EDIT. + +package agvtask + +import ( + "entgo.io/ent/dialect/sql" +) + +const ( + // Label holds the string label denoting the agvtask type in the database. + Label = "agv_task" + // FieldID holds the string denoting the id field in the database. + FieldID = "id" + // FieldTaskNo holds the string denoting the task_no field in the database. + FieldTaskNo = "task_no" + // FieldHikTaskCode holds the string denoting the hik_task_code field in the database. + FieldHikTaskCode = "hik_task_code" + // FieldSourceDock holds the string denoting the source_dock field in the database. + FieldSourceDock = "source_dock" + // FieldTargetDock holds the string denoting the target_dock field in the database. + FieldTargetDock = "target_dock" + // FieldMaterialsJSON holds the string denoting the materials_json field in the database. + FieldMaterialsJSON = "materials_json" + // FieldRelatedOutboundNo holds the string denoting the related_outbound_no field in the database. + FieldRelatedOutboundNo = "related_outbound_no" + // FieldStatus holds the string denoting the status field in the database. + FieldStatus = "status" + // FieldOperator holds the string denoting the operator field in the database. + FieldOperator = "operator" + // FieldDispatchedAt holds the string denoting the dispatched_at field in the database. + FieldDispatchedAt = "dispatched_at" + // FieldArrivedAt holds the string denoting the arrived_at field in the database. + FieldArrivedAt = "arrived_at" + // FieldRemark holds the string denoting the remark field in the database. + FieldRemark = "remark" + // FieldCreatedAt holds the string denoting the created_at field in the database. + FieldCreatedAt = "created_at" + // Table holds the table name of the agvtask in the database. + Table = "agv_tasks" +) + +// Columns holds all SQL columns for agvtask fields. +var Columns = []string{ + FieldID, + FieldTaskNo, + FieldHikTaskCode, + FieldSourceDock, + FieldTargetDock, + FieldMaterialsJSON, + FieldRelatedOutboundNo, + FieldStatus, + FieldOperator, + FieldDispatchedAt, + FieldArrivedAt, + FieldRemark, + FieldCreatedAt, +} + +// ValidColumn reports if the column name is valid (part of the table columns). +func ValidColumn(column string) bool { + for i := range Columns { + if column == Columns[i] { + return true + } + } + return false +} + +var ( + // TaskNoValidator is a validator for the "task_no" field. It is called by the builders before save. + TaskNoValidator func(string) error + // DefaultHikTaskCode holds the default value on creation for the "hik_task_code" field. + DefaultHikTaskCode string + // HikTaskCodeValidator is a validator for the "hik_task_code" field. It is called by the builders before save. + HikTaskCodeValidator func(string) error + // DefaultSourceDock holds the default value on creation for the "source_dock" field. + DefaultSourceDock string + // SourceDockValidator is a validator for the "source_dock" field. It is called by the builders before save. + SourceDockValidator func(string) error + // DefaultTargetDock holds the default value on creation for the "target_dock" field. + DefaultTargetDock string + // TargetDockValidator is a validator for the "target_dock" field. It is called by the builders before save. + TargetDockValidator func(string) error + // DefaultMaterialsJSON holds the default value on creation for the "materials_json" field. + DefaultMaterialsJSON string + // MaterialsJSONValidator is a validator for the "materials_json" field. It is called by the builders before save. + MaterialsJSONValidator func(string) error + // DefaultRelatedOutboundNo holds the default value on creation for the "related_outbound_no" field. + DefaultRelatedOutboundNo string + // RelatedOutboundNoValidator is a validator for the "related_outbound_no" field. It is called by the builders before save. + RelatedOutboundNoValidator func(string) error + // DefaultStatus holds the default value on creation for the "status" field. + DefaultStatus string + // StatusValidator is a validator for the "status" field. It is called by the builders before save. + StatusValidator func(string) error + // DefaultOperator holds the default value on creation for the "operator" field. + DefaultOperator string + // OperatorValidator is a validator for the "operator" field. It is called by the builders before save. + OperatorValidator func(string) error + // DefaultDispatchedAt holds the default value on creation for the "dispatched_at" field. + DefaultDispatchedAt int64 + // DefaultArrivedAt holds the default value on creation for the "arrived_at" field. + DefaultArrivedAt int64 + // DefaultRemark holds the default value on creation for the "remark" field. + DefaultRemark string + // RemarkValidator is a validator for the "remark" field. It is called by the builders before save. + RemarkValidator func(string) error + // DefaultCreatedAt holds the default value on creation for the "created_at" field. + DefaultCreatedAt func() int64 +) + +// OrderOption defines the ordering options for the AgvTask queries. +type OrderOption func(*sql.Selector) + +// ByID orders the results by the id field. +func ByID(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldID, opts...).ToFunc() +} + +// ByTaskNo orders the results by the task_no field. +func ByTaskNo(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldTaskNo, opts...).ToFunc() +} + +// ByHikTaskCode orders the results by the hik_task_code field. +func ByHikTaskCode(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldHikTaskCode, opts...).ToFunc() +} + +// BySourceDock orders the results by the source_dock field. +func BySourceDock(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldSourceDock, opts...).ToFunc() +} + +// ByTargetDock orders the results by the target_dock field. +func ByTargetDock(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldTargetDock, opts...).ToFunc() +} + +// ByMaterialsJSON orders the results by the materials_json field. +func ByMaterialsJSON(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldMaterialsJSON, opts...).ToFunc() +} + +// ByRelatedOutboundNo orders the results by the related_outbound_no field. +func ByRelatedOutboundNo(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldRelatedOutboundNo, opts...).ToFunc() +} + +// ByStatus orders the results by the status field. +func ByStatus(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldStatus, opts...).ToFunc() +} + +// ByOperator orders the results by the operator field. +func ByOperator(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldOperator, opts...).ToFunc() +} + +// ByDispatchedAt orders the results by the dispatched_at field. +func ByDispatchedAt(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldDispatchedAt, opts...).ToFunc() +} + +// ByArrivedAt orders the results by the arrived_at field. +func ByArrivedAt(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldArrivedAt, opts...).ToFunc() +} + +// ByRemark orders the results by the remark field. +func ByRemark(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldRemark, opts...).ToFunc() +} + +// ByCreatedAt orders the results by the created_at field. +func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldCreatedAt, opts...).ToFunc() +} diff --git a/bj_power_wms/agvtask/where.go b/bj_power_wms/agvtask/where.go new file mode 100644 index 0000000..34b351f --- /dev/null +++ b/bj_power_wms/agvtask/where.go @@ -0,0 +1,854 @@ +// Code generated by ent, DO NOT EDIT. + +package agvtask + +import ( + "bj_power_wms/predicate" + + "entgo.io/ent/dialect/sql" +) + +// ID filters vertices based on their ID field. +func ID(id int) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEQ(FieldID, id)) +} + +// IDEQ applies the EQ predicate on the ID field. +func IDEQ(id int) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEQ(FieldID, id)) +} + +// IDNEQ applies the NEQ predicate on the ID field. +func IDNEQ(id int) predicate.AgvTask { + return predicate.AgvTask(sql.FieldNEQ(FieldID, id)) +} + +// IDIn applies the In predicate on the ID field. +func IDIn(ids ...int) predicate.AgvTask { + return predicate.AgvTask(sql.FieldIn(FieldID, ids...)) +} + +// IDNotIn applies the NotIn predicate on the ID field. +func IDNotIn(ids ...int) predicate.AgvTask { + return predicate.AgvTask(sql.FieldNotIn(FieldID, ids...)) +} + +// IDGT applies the GT predicate on the ID field. +func IDGT(id int) predicate.AgvTask { + return predicate.AgvTask(sql.FieldGT(FieldID, id)) +} + +// IDGTE applies the GTE predicate on the ID field. +func IDGTE(id int) predicate.AgvTask { + return predicate.AgvTask(sql.FieldGTE(FieldID, id)) +} + +// IDLT applies the LT predicate on the ID field. +func IDLT(id int) predicate.AgvTask { + return predicate.AgvTask(sql.FieldLT(FieldID, id)) +} + +// IDLTE applies the LTE predicate on the ID field. +func IDLTE(id int) predicate.AgvTask { + return predicate.AgvTask(sql.FieldLTE(FieldID, id)) +} + +// TaskNo applies equality check predicate on the "task_no" field. It's identical to TaskNoEQ. +func TaskNo(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEQ(FieldTaskNo, v)) +} + +// HikTaskCode applies equality check predicate on the "hik_task_code" field. It's identical to HikTaskCodeEQ. +func HikTaskCode(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEQ(FieldHikTaskCode, v)) +} + +// SourceDock applies equality check predicate on the "source_dock" field. It's identical to SourceDockEQ. +func SourceDock(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEQ(FieldSourceDock, v)) +} + +// TargetDock applies equality check predicate on the "target_dock" field. It's identical to TargetDockEQ. +func TargetDock(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEQ(FieldTargetDock, v)) +} + +// MaterialsJSON applies equality check predicate on the "materials_json" field. It's identical to MaterialsJSONEQ. +func MaterialsJSON(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEQ(FieldMaterialsJSON, v)) +} + +// RelatedOutboundNo applies equality check predicate on the "related_outbound_no" field. It's identical to RelatedOutboundNoEQ. +func RelatedOutboundNo(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEQ(FieldRelatedOutboundNo, v)) +} + +// Status applies equality check predicate on the "status" field. It's identical to StatusEQ. +func Status(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEQ(FieldStatus, v)) +} + +// Operator applies equality check predicate on the "operator" field. It's identical to OperatorEQ. +func Operator(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEQ(FieldOperator, v)) +} + +// DispatchedAt applies equality check predicate on the "dispatched_at" field. It's identical to DispatchedAtEQ. +func DispatchedAt(v int64) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEQ(FieldDispatchedAt, v)) +} + +// ArrivedAt applies equality check predicate on the "arrived_at" field. It's identical to ArrivedAtEQ. +func ArrivedAt(v int64) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEQ(FieldArrivedAt, v)) +} + +// Remark applies equality check predicate on the "remark" field. It's identical to RemarkEQ. +func Remark(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEQ(FieldRemark, v)) +} + +// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ. +func CreatedAt(v int64) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEQ(FieldCreatedAt, v)) +} + +// TaskNoEQ applies the EQ predicate on the "task_no" field. +func TaskNoEQ(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEQ(FieldTaskNo, v)) +} + +// TaskNoNEQ applies the NEQ predicate on the "task_no" field. +func TaskNoNEQ(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldNEQ(FieldTaskNo, v)) +} + +// TaskNoIn applies the In predicate on the "task_no" field. +func TaskNoIn(vs ...string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldIn(FieldTaskNo, vs...)) +} + +// TaskNoNotIn applies the NotIn predicate on the "task_no" field. +func TaskNoNotIn(vs ...string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldNotIn(FieldTaskNo, vs...)) +} + +// TaskNoGT applies the GT predicate on the "task_no" field. +func TaskNoGT(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldGT(FieldTaskNo, v)) +} + +// TaskNoGTE applies the GTE predicate on the "task_no" field. +func TaskNoGTE(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldGTE(FieldTaskNo, v)) +} + +// TaskNoLT applies the LT predicate on the "task_no" field. +func TaskNoLT(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldLT(FieldTaskNo, v)) +} + +// TaskNoLTE applies the LTE predicate on the "task_no" field. +func TaskNoLTE(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldLTE(FieldTaskNo, v)) +} + +// TaskNoContains applies the Contains predicate on the "task_no" field. +func TaskNoContains(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldContains(FieldTaskNo, v)) +} + +// TaskNoHasPrefix applies the HasPrefix predicate on the "task_no" field. +func TaskNoHasPrefix(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldHasPrefix(FieldTaskNo, v)) +} + +// TaskNoHasSuffix applies the HasSuffix predicate on the "task_no" field. +func TaskNoHasSuffix(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldHasSuffix(FieldTaskNo, v)) +} + +// TaskNoEqualFold applies the EqualFold predicate on the "task_no" field. +func TaskNoEqualFold(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEqualFold(FieldTaskNo, v)) +} + +// TaskNoContainsFold applies the ContainsFold predicate on the "task_no" field. +func TaskNoContainsFold(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldContainsFold(FieldTaskNo, v)) +} + +// HikTaskCodeEQ applies the EQ predicate on the "hik_task_code" field. +func HikTaskCodeEQ(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEQ(FieldHikTaskCode, v)) +} + +// HikTaskCodeNEQ applies the NEQ predicate on the "hik_task_code" field. +func HikTaskCodeNEQ(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldNEQ(FieldHikTaskCode, v)) +} + +// HikTaskCodeIn applies the In predicate on the "hik_task_code" field. +func HikTaskCodeIn(vs ...string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldIn(FieldHikTaskCode, vs...)) +} + +// HikTaskCodeNotIn applies the NotIn predicate on the "hik_task_code" field. +func HikTaskCodeNotIn(vs ...string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldNotIn(FieldHikTaskCode, vs...)) +} + +// HikTaskCodeGT applies the GT predicate on the "hik_task_code" field. +func HikTaskCodeGT(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldGT(FieldHikTaskCode, v)) +} + +// HikTaskCodeGTE applies the GTE predicate on the "hik_task_code" field. +func HikTaskCodeGTE(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldGTE(FieldHikTaskCode, v)) +} + +// HikTaskCodeLT applies the LT predicate on the "hik_task_code" field. +func HikTaskCodeLT(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldLT(FieldHikTaskCode, v)) +} + +// HikTaskCodeLTE applies the LTE predicate on the "hik_task_code" field. +func HikTaskCodeLTE(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldLTE(FieldHikTaskCode, v)) +} + +// HikTaskCodeContains applies the Contains predicate on the "hik_task_code" field. +func HikTaskCodeContains(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldContains(FieldHikTaskCode, v)) +} + +// HikTaskCodeHasPrefix applies the HasPrefix predicate on the "hik_task_code" field. +func HikTaskCodeHasPrefix(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldHasPrefix(FieldHikTaskCode, v)) +} + +// HikTaskCodeHasSuffix applies the HasSuffix predicate on the "hik_task_code" field. +func HikTaskCodeHasSuffix(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldHasSuffix(FieldHikTaskCode, v)) +} + +// HikTaskCodeEqualFold applies the EqualFold predicate on the "hik_task_code" field. +func HikTaskCodeEqualFold(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEqualFold(FieldHikTaskCode, v)) +} + +// HikTaskCodeContainsFold applies the ContainsFold predicate on the "hik_task_code" field. +func HikTaskCodeContainsFold(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldContainsFold(FieldHikTaskCode, v)) +} + +// SourceDockEQ applies the EQ predicate on the "source_dock" field. +func SourceDockEQ(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEQ(FieldSourceDock, v)) +} + +// SourceDockNEQ applies the NEQ predicate on the "source_dock" field. +func SourceDockNEQ(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldNEQ(FieldSourceDock, v)) +} + +// SourceDockIn applies the In predicate on the "source_dock" field. +func SourceDockIn(vs ...string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldIn(FieldSourceDock, vs...)) +} + +// SourceDockNotIn applies the NotIn predicate on the "source_dock" field. +func SourceDockNotIn(vs ...string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldNotIn(FieldSourceDock, vs...)) +} + +// SourceDockGT applies the GT predicate on the "source_dock" field. +func SourceDockGT(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldGT(FieldSourceDock, v)) +} + +// SourceDockGTE applies the GTE predicate on the "source_dock" field. +func SourceDockGTE(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldGTE(FieldSourceDock, v)) +} + +// SourceDockLT applies the LT predicate on the "source_dock" field. +func SourceDockLT(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldLT(FieldSourceDock, v)) +} + +// SourceDockLTE applies the LTE predicate on the "source_dock" field. +func SourceDockLTE(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldLTE(FieldSourceDock, v)) +} + +// SourceDockContains applies the Contains predicate on the "source_dock" field. +func SourceDockContains(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldContains(FieldSourceDock, v)) +} + +// SourceDockHasPrefix applies the HasPrefix predicate on the "source_dock" field. +func SourceDockHasPrefix(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldHasPrefix(FieldSourceDock, v)) +} + +// SourceDockHasSuffix applies the HasSuffix predicate on the "source_dock" field. +func SourceDockHasSuffix(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldHasSuffix(FieldSourceDock, v)) +} + +// SourceDockEqualFold applies the EqualFold predicate on the "source_dock" field. +func SourceDockEqualFold(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEqualFold(FieldSourceDock, v)) +} + +// SourceDockContainsFold applies the ContainsFold predicate on the "source_dock" field. +func SourceDockContainsFold(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldContainsFold(FieldSourceDock, v)) +} + +// TargetDockEQ applies the EQ predicate on the "target_dock" field. +func TargetDockEQ(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEQ(FieldTargetDock, v)) +} + +// TargetDockNEQ applies the NEQ predicate on the "target_dock" field. +func TargetDockNEQ(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldNEQ(FieldTargetDock, v)) +} + +// TargetDockIn applies the In predicate on the "target_dock" field. +func TargetDockIn(vs ...string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldIn(FieldTargetDock, vs...)) +} + +// TargetDockNotIn applies the NotIn predicate on the "target_dock" field. +func TargetDockNotIn(vs ...string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldNotIn(FieldTargetDock, vs...)) +} + +// TargetDockGT applies the GT predicate on the "target_dock" field. +func TargetDockGT(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldGT(FieldTargetDock, v)) +} + +// TargetDockGTE applies the GTE predicate on the "target_dock" field. +func TargetDockGTE(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldGTE(FieldTargetDock, v)) +} + +// TargetDockLT applies the LT predicate on the "target_dock" field. +func TargetDockLT(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldLT(FieldTargetDock, v)) +} + +// TargetDockLTE applies the LTE predicate on the "target_dock" field. +func TargetDockLTE(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldLTE(FieldTargetDock, v)) +} + +// TargetDockContains applies the Contains predicate on the "target_dock" field. +func TargetDockContains(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldContains(FieldTargetDock, v)) +} + +// TargetDockHasPrefix applies the HasPrefix predicate on the "target_dock" field. +func TargetDockHasPrefix(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldHasPrefix(FieldTargetDock, v)) +} + +// TargetDockHasSuffix applies the HasSuffix predicate on the "target_dock" field. +func TargetDockHasSuffix(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldHasSuffix(FieldTargetDock, v)) +} + +// TargetDockEqualFold applies the EqualFold predicate on the "target_dock" field. +func TargetDockEqualFold(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEqualFold(FieldTargetDock, v)) +} + +// TargetDockContainsFold applies the ContainsFold predicate on the "target_dock" field. +func TargetDockContainsFold(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldContainsFold(FieldTargetDock, v)) +} + +// MaterialsJSONEQ applies the EQ predicate on the "materials_json" field. +func MaterialsJSONEQ(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEQ(FieldMaterialsJSON, v)) +} + +// MaterialsJSONNEQ applies the NEQ predicate on the "materials_json" field. +func MaterialsJSONNEQ(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldNEQ(FieldMaterialsJSON, v)) +} + +// MaterialsJSONIn applies the In predicate on the "materials_json" field. +func MaterialsJSONIn(vs ...string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldIn(FieldMaterialsJSON, vs...)) +} + +// MaterialsJSONNotIn applies the NotIn predicate on the "materials_json" field. +func MaterialsJSONNotIn(vs ...string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldNotIn(FieldMaterialsJSON, vs...)) +} + +// MaterialsJSONGT applies the GT predicate on the "materials_json" field. +func MaterialsJSONGT(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldGT(FieldMaterialsJSON, v)) +} + +// MaterialsJSONGTE applies the GTE predicate on the "materials_json" field. +func MaterialsJSONGTE(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldGTE(FieldMaterialsJSON, v)) +} + +// MaterialsJSONLT applies the LT predicate on the "materials_json" field. +func MaterialsJSONLT(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldLT(FieldMaterialsJSON, v)) +} + +// MaterialsJSONLTE applies the LTE predicate on the "materials_json" field. +func MaterialsJSONLTE(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldLTE(FieldMaterialsJSON, v)) +} + +// MaterialsJSONContains applies the Contains predicate on the "materials_json" field. +func MaterialsJSONContains(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldContains(FieldMaterialsJSON, v)) +} + +// MaterialsJSONHasPrefix applies the HasPrefix predicate on the "materials_json" field. +func MaterialsJSONHasPrefix(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldHasPrefix(FieldMaterialsJSON, v)) +} + +// MaterialsJSONHasSuffix applies the HasSuffix predicate on the "materials_json" field. +func MaterialsJSONHasSuffix(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldHasSuffix(FieldMaterialsJSON, v)) +} + +// MaterialsJSONEqualFold applies the EqualFold predicate on the "materials_json" field. +func MaterialsJSONEqualFold(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEqualFold(FieldMaterialsJSON, v)) +} + +// MaterialsJSONContainsFold applies the ContainsFold predicate on the "materials_json" field. +func MaterialsJSONContainsFold(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldContainsFold(FieldMaterialsJSON, v)) +} + +// RelatedOutboundNoEQ applies the EQ predicate on the "related_outbound_no" field. +func RelatedOutboundNoEQ(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEQ(FieldRelatedOutboundNo, v)) +} + +// RelatedOutboundNoNEQ applies the NEQ predicate on the "related_outbound_no" field. +func RelatedOutboundNoNEQ(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldNEQ(FieldRelatedOutboundNo, v)) +} + +// RelatedOutboundNoIn applies the In predicate on the "related_outbound_no" field. +func RelatedOutboundNoIn(vs ...string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldIn(FieldRelatedOutboundNo, vs...)) +} + +// RelatedOutboundNoNotIn applies the NotIn predicate on the "related_outbound_no" field. +func RelatedOutboundNoNotIn(vs ...string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldNotIn(FieldRelatedOutboundNo, vs...)) +} + +// RelatedOutboundNoGT applies the GT predicate on the "related_outbound_no" field. +func RelatedOutboundNoGT(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldGT(FieldRelatedOutboundNo, v)) +} + +// RelatedOutboundNoGTE applies the GTE predicate on the "related_outbound_no" field. +func RelatedOutboundNoGTE(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldGTE(FieldRelatedOutboundNo, v)) +} + +// RelatedOutboundNoLT applies the LT predicate on the "related_outbound_no" field. +func RelatedOutboundNoLT(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldLT(FieldRelatedOutboundNo, v)) +} + +// RelatedOutboundNoLTE applies the LTE predicate on the "related_outbound_no" field. +func RelatedOutboundNoLTE(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldLTE(FieldRelatedOutboundNo, v)) +} + +// RelatedOutboundNoContains applies the Contains predicate on the "related_outbound_no" field. +func RelatedOutboundNoContains(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldContains(FieldRelatedOutboundNo, v)) +} + +// RelatedOutboundNoHasPrefix applies the HasPrefix predicate on the "related_outbound_no" field. +func RelatedOutboundNoHasPrefix(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldHasPrefix(FieldRelatedOutboundNo, v)) +} + +// RelatedOutboundNoHasSuffix applies the HasSuffix predicate on the "related_outbound_no" field. +func RelatedOutboundNoHasSuffix(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldHasSuffix(FieldRelatedOutboundNo, v)) +} + +// RelatedOutboundNoIsNil applies the IsNil predicate on the "related_outbound_no" field. +func RelatedOutboundNoIsNil() predicate.AgvTask { + return predicate.AgvTask(sql.FieldIsNull(FieldRelatedOutboundNo)) +} + +// RelatedOutboundNoNotNil applies the NotNil predicate on the "related_outbound_no" field. +func RelatedOutboundNoNotNil() predicate.AgvTask { + return predicate.AgvTask(sql.FieldNotNull(FieldRelatedOutboundNo)) +} + +// RelatedOutboundNoEqualFold applies the EqualFold predicate on the "related_outbound_no" field. +func RelatedOutboundNoEqualFold(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEqualFold(FieldRelatedOutboundNo, v)) +} + +// RelatedOutboundNoContainsFold applies the ContainsFold predicate on the "related_outbound_no" field. +func RelatedOutboundNoContainsFold(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldContainsFold(FieldRelatedOutboundNo, v)) +} + +// StatusEQ applies the EQ predicate on the "status" field. +func StatusEQ(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEQ(FieldStatus, v)) +} + +// StatusNEQ applies the NEQ predicate on the "status" field. +func StatusNEQ(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldNEQ(FieldStatus, v)) +} + +// StatusIn applies the In predicate on the "status" field. +func StatusIn(vs ...string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldIn(FieldStatus, vs...)) +} + +// StatusNotIn applies the NotIn predicate on the "status" field. +func StatusNotIn(vs ...string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldNotIn(FieldStatus, vs...)) +} + +// StatusGT applies the GT predicate on the "status" field. +func StatusGT(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldGT(FieldStatus, v)) +} + +// StatusGTE applies the GTE predicate on the "status" field. +func StatusGTE(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldGTE(FieldStatus, v)) +} + +// StatusLT applies the LT predicate on the "status" field. +func StatusLT(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldLT(FieldStatus, v)) +} + +// StatusLTE applies the LTE predicate on the "status" field. +func StatusLTE(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldLTE(FieldStatus, v)) +} + +// StatusContains applies the Contains predicate on the "status" field. +func StatusContains(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldContains(FieldStatus, v)) +} + +// StatusHasPrefix applies the HasPrefix predicate on the "status" field. +func StatusHasPrefix(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldHasPrefix(FieldStatus, v)) +} + +// StatusHasSuffix applies the HasSuffix predicate on the "status" field. +func StatusHasSuffix(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldHasSuffix(FieldStatus, v)) +} + +// StatusEqualFold applies the EqualFold predicate on the "status" field. +func StatusEqualFold(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEqualFold(FieldStatus, v)) +} + +// StatusContainsFold applies the ContainsFold predicate on the "status" field. +func StatusContainsFold(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldContainsFold(FieldStatus, v)) +} + +// OperatorEQ applies the EQ predicate on the "operator" field. +func OperatorEQ(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEQ(FieldOperator, v)) +} + +// OperatorNEQ applies the NEQ predicate on the "operator" field. +func OperatorNEQ(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldNEQ(FieldOperator, v)) +} + +// OperatorIn applies the In predicate on the "operator" field. +func OperatorIn(vs ...string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldIn(FieldOperator, vs...)) +} + +// OperatorNotIn applies the NotIn predicate on the "operator" field. +func OperatorNotIn(vs ...string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldNotIn(FieldOperator, vs...)) +} + +// OperatorGT applies the GT predicate on the "operator" field. +func OperatorGT(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldGT(FieldOperator, v)) +} + +// OperatorGTE applies the GTE predicate on the "operator" field. +func OperatorGTE(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldGTE(FieldOperator, v)) +} + +// OperatorLT applies the LT predicate on the "operator" field. +func OperatorLT(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldLT(FieldOperator, v)) +} + +// OperatorLTE applies the LTE predicate on the "operator" field. +func OperatorLTE(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldLTE(FieldOperator, v)) +} + +// OperatorContains applies the Contains predicate on the "operator" field. +func OperatorContains(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldContains(FieldOperator, v)) +} + +// OperatorHasPrefix applies the HasPrefix predicate on the "operator" field. +func OperatorHasPrefix(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldHasPrefix(FieldOperator, v)) +} + +// OperatorHasSuffix applies the HasSuffix predicate on the "operator" field. +func OperatorHasSuffix(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldHasSuffix(FieldOperator, v)) +} + +// OperatorEqualFold applies the EqualFold predicate on the "operator" field. +func OperatorEqualFold(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEqualFold(FieldOperator, v)) +} + +// OperatorContainsFold applies the ContainsFold predicate on the "operator" field. +func OperatorContainsFold(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldContainsFold(FieldOperator, v)) +} + +// DispatchedAtEQ applies the EQ predicate on the "dispatched_at" field. +func DispatchedAtEQ(v int64) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEQ(FieldDispatchedAt, v)) +} + +// DispatchedAtNEQ applies the NEQ predicate on the "dispatched_at" field. +func DispatchedAtNEQ(v int64) predicate.AgvTask { + return predicate.AgvTask(sql.FieldNEQ(FieldDispatchedAt, v)) +} + +// DispatchedAtIn applies the In predicate on the "dispatched_at" field. +func DispatchedAtIn(vs ...int64) predicate.AgvTask { + return predicate.AgvTask(sql.FieldIn(FieldDispatchedAt, vs...)) +} + +// DispatchedAtNotIn applies the NotIn predicate on the "dispatched_at" field. +func DispatchedAtNotIn(vs ...int64) predicate.AgvTask { + return predicate.AgvTask(sql.FieldNotIn(FieldDispatchedAt, vs...)) +} + +// DispatchedAtGT applies the GT predicate on the "dispatched_at" field. +func DispatchedAtGT(v int64) predicate.AgvTask { + return predicate.AgvTask(sql.FieldGT(FieldDispatchedAt, v)) +} + +// DispatchedAtGTE applies the GTE predicate on the "dispatched_at" field. +func DispatchedAtGTE(v int64) predicate.AgvTask { + return predicate.AgvTask(sql.FieldGTE(FieldDispatchedAt, v)) +} + +// DispatchedAtLT applies the LT predicate on the "dispatched_at" field. +func DispatchedAtLT(v int64) predicate.AgvTask { + return predicate.AgvTask(sql.FieldLT(FieldDispatchedAt, v)) +} + +// DispatchedAtLTE applies the LTE predicate on the "dispatched_at" field. +func DispatchedAtLTE(v int64) predicate.AgvTask { + return predicate.AgvTask(sql.FieldLTE(FieldDispatchedAt, v)) +} + +// ArrivedAtEQ applies the EQ predicate on the "arrived_at" field. +func ArrivedAtEQ(v int64) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEQ(FieldArrivedAt, v)) +} + +// ArrivedAtNEQ applies the NEQ predicate on the "arrived_at" field. +func ArrivedAtNEQ(v int64) predicate.AgvTask { + return predicate.AgvTask(sql.FieldNEQ(FieldArrivedAt, v)) +} + +// ArrivedAtIn applies the In predicate on the "arrived_at" field. +func ArrivedAtIn(vs ...int64) predicate.AgvTask { + return predicate.AgvTask(sql.FieldIn(FieldArrivedAt, vs...)) +} + +// ArrivedAtNotIn applies the NotIn predicate on the "arrived_at" field. +func ArrivedAtNotIn(vs ...int64) predicate.AgvTask { + return predicate.AgvTask(sql.FieldNotIn(FieldArrivedAt, vs...)) +} + +// ArrivedAtGT applies the GT predicate on the "arrived_at" field. +func ArrivedAtGT(v int64) predicate.AgvTask { + return predicate.AgvTask(sql.FieldGT(FieldArrivedAt, v)) +} + +// ArrivedAtGTE applies the GTE predicate on the "arrived_at" field. +func ArrivedAtGTE(v int64) predicate.AgvTask { + return predicate.AgvTask(sql.FieldGTE(FieldArrivedAt, v)) +} + +// ArrivedAtLT applies the LT predicate on the "arrived_at" field. +func ArrivedAtLT(v int64) predicate.AgvTask { + return predicate.AgvTask(sql.FieldLT(FieldArrivedAt, v)) +} + +// ArrivedAtLTE applies the LTE predicate on the "arrived_at" field. +func ArrivedAtLTE(v int64) predicate.AgvTask { + return predicate.AgvTask(sql.FieldLTE(FieldArrivedAt, v)) +} + +// RemarkEQ applies the EQ predicate on the "remark" field. +func RemarkEQ(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEQ(FieldRemark, v)) +} + +// RemarkNEQ applies the NEQ predicate on the "remark" field. +func RemarkNEQ(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldNEQ(FieldRemark, v)) +} + +// RemarkIn applies the In predicate on the "remark" field. +func RemarkIn(vs ...string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldIn(FieldRemark, vs...)) +} + +// RemarkNotIn applies the NotIn predicate on the "remark" field. +func RemarkNotIn(vs ...string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldNotIn(FieldRemark, vs...)) +} + +// RemarkGT applies the GT predicate on the "remark" field. +func RemarkGT(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldGT(FieldRemark, v)) +} + +// RemarkGTE applies the GTE predicate on the "remark" field. +func RemarkGTE(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldGTE(FieldRemark, v)) +} + +// RemarkLT applies the LT predicate on the "remark" field. +func RemarkLT(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldLT(FieldRemark, v)) +} + +// RemarkLTE applies the LTE predicate on the "remark" field. +func RemarkLTE(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldLTE(FieldRemark, v)) +} + +// RemarkContains applies the Contains predicate on the "remark" field. +func RemarkContains(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldContains(FieldRemark, v)) +} + +// RemarkHasPrefix applies the HasPrefix predicate on the "remark" field. +func RemarkHasPrefix(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldHasPrefix(FieldRemark, v)) +} + +// RemarkHasSuffix applies the HasSuffix predicate on the "remark" field. +func RemarkHasSuffix(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldHasSuffix(FieldRemark, v)) +} + +// RemarkIsNil applies the IsNil predicate on the "remark" field. +func RemarkIsNil() predicate.AgvTask { + return predicate.AgvTask(sql.FieldIsNull(FieldRemark)) +} + +// RemarkNotNil applies the NotNil predicate on the "remark" field. +func RemarkNotNil() predicate.AgvTask { + return predicate.AgvTask(sql.FieldNotNull(FieldRemark)) +} + +// RemarkEqualFold applies the EqualFold predicate on the "remark" field. +func RemarkEqualFold(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEqualFold(FieldRemark, v)) +} + +// RemarkContainsFold applies the ContainsFold predicate on the "remark" field. +func RemarkContainsFold(v string) predicate.AgvTask { + return predicate.AgvTask(sql.FieldContainsFold(FieldRemark, v)) +} + +// CreatedAtEQ applies the EQ predicate on the "created_at" field. +func CreatedAtEQ(v int64) predicate.AgvTask { + return predicate.AgvTask(sql.FieldEQ(FieldCreatedAt, v)) +} + +// CreatedAtNEQ applies the NEQ predicate on the "created_at" field. +func CreatedAtNEQ(v int64) predicate.AgvTask { + return predicate.AgvTask(sql.FieldNEQ(FieldCreatedAt, v)) +} + +// CreatedAtIn applies the In predicate on the "created_at" field. +func CreatedAtIn(vs ...int64) predicate.AgvTask { + return predicate.AgvTask(sql.FieldIn(FieldCreatedAt, vs...)) +} + +// CreatedAtNotIn applies the NotIn predicate on the "created_at" field. +func CreatedAtNotIn(vs ...int64) predicate.AgvTask { + return predicate.AgvTask(sql.FieldNotIn(FieldCreatedAt, vs...)) +} + +// CreatedAtGT applies the GT predicate on the "created_at" field. +func CreatedAtGT(v int64) predicate.AgvTask { + return predicate.AgvTask(sql.FieldGT(FieldCreatedAt, v)) +} + +// CreatedAtGTE applies the GTE predicate on the "created_at" field. +func CreatedAtGTE(v int64) predicate.AgvTask { + return predicate.AgvTask(sql.FieldGTE(FieldCreatedAt, v)) +} + +// CreatedAtLT applies the LT predicate on the "created_at" field. +func CreatedAtLT(v int64) predicate.AgvTask { + return predicate.AgvTask(sql.FieldLT(FieldCreatedAt, v)) +} + +// CreatedAtLTE applies the LTE predicate on the "created_at" field. +func CreatedAtLTE(v int64) predicate.AgvTask { + return predicate.AgvTask(sql.FieldLTE(FieldCreatedAt, v)) +} + +// And groups predicates with the AND operator between them. +func And(predicates ...predicate.AgvTask) predicate.AgvTask { + return predicate.AgvTask(sql.AndPredicates(predicates...)) +} + +// Or groups predicates with the OR operator between them. +func Or(predicates ...predicate.AgvTask) predicate.AgvTask { + return predicate.AgvTask(sql.OrPredicates(predicates...)) +} + +// Not applies the not operator on the given predicate. +func Not(p predicate.AgvTask) predicate.AgvTask { + return predicate.AgvTask(sql.NotPredicates(p)) +} diff --git a/bj_power_wms/attachment/attachment.go b/bj_power_wms/attachment/attachment.go new file mode 100644 index 0000000..62a48d1 --- /dev/null +++ b/bj_power_wms/attachment/attachment.go @@ -0,0 +1,178 @@ +// Code generated by ent, DO NOT EDIT. + +package attachment + +import ( + "entgo.io/ent/dialect/sql" +) + +const ( + // Label holds the string label denoting the attachment type in the database. + Label = "attachment" + // FieldID holds the string denoting the id field in the database. + FieldID = "id" + // FieldBizType holds the string denoting the biz_type field in the database. + FieldBizType = "biz_type" + // FieldBizID holds the string denoting the biz_id field in the database. + FieldBizID = "biz_id" + // FieldFileName holds the string denoting the file_name field in the database. + FieldFileName = "file_name" + // FieldFilePath holds the string denoting the file_path field in the database. + FieldFilePath = "file_path" + // FieldFileType holds the string denoting the file_type field in the database. + FieldFileType = "file_type" + // FieldFileExt holds the string denoting the file_ext field in the database. + FieldFileExt = "file_ext" + // FieldFileMd5 holds the string denoting the file_md5 field in the database. + FieldFileMd5 = "file_md5" + // FieldFileSize holds the string denoting the file_size field in the database. + FieldFileSize = "file_size" + // FieldMimeType holds the string denoting the mime_type field in the database. + FieldMimeType = "mime_type" + // FieldUploadedBy holds the string denoting the uploaded_by field in the database. + FieldUploadedBy = "uploaded_by" + // FieldArchived holds the string denoting the archived field in the database. + FieldArchived = "archived" + // FieldArchivedAt holds the string denoting the archived_at field in the database. + FieldArchivedAt = "archived_at" + // FieldDeleted holds the string denoting the deleted field in the database. + FieldDeleted = "deleted" + // FieldDeletedAt holds the string denoting the deleted_at field in the database. + FieldDeletedAt = "deleted_at" + // FieldDeletedBy holds the string denoting the deleted_by field in the database. + FieldDeletedBy = "deleted_by" + // FieldCreatedAt holds the string denoting the created_at field in the database. + FieldCreatedAt = "created_at" + // Table holds the table name of the attachment in the database. + Table = "attachments" +) + +// Columns holds all SQL columns for attachment fields. +var Columns = []string{ + FieldID, + FieldBizType, + FieldBizID, + FieldFileName, + FieldFilePath, + FieldFileType, + FieldFileExt, + FieldFileMd5, + FieldFileSize, + FieldMimeType, + FieldUploadedBy, + FieldArchived, + FieldArchivedAt, + FieldDeleted, + FieldDeletedAt, + FieldDeletedBy, + FieldCreatedAt, +} + +// ValidColumn reports if the column name is valid (part of the table columns). +func ValidColumn(column string) bool { + for i := range Columns { + if column == Columns[i] { + return true + } + } + return false +} + +var ( + // DefaultFileSize holds the default value on creation for the "file_size" field. + DefaultFileSize int64 + // DefaultArchived holds the default value on creation for the "archived" field. + DefaultArchived bool + // DefaultDeleted holds the default value on creation for the "deleted" field. + DefaultDeleted bool + // DefaultCreatedAt holds the default value on creation for the "created_at" field. + DefaultCreatedAt func() int64 +) + +// OrderOption defines the ordering options for the Attachment queries. +type OrderOption func(*sql.Selector) + +// ByID orders the results by the id field. +func ByID(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldID, opts...).ToFunc() +} + +// ByBizType orders the results by the biz_type field. +func ByBizType(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldBizType, opts...).ToFunc() +} + +// ByBizID orders the results by the biz_id field. +func ByBizID(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldBizID, opts...).ToFunc() +} + +// ByFileName orders the results by the file_name field. +func ByFileName(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldFileName, opts...).ToFunc() +} + +// ByFilePath orders the results by the file_path field. +func ByFilePath(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldFilePath, opts...).ToFunc() +} + +// ByFileType orders the results by the file_type field. +func ByFileType(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldFileType, opts...).ToFunc() +} + +// ByFileExt orders the results by the file_ext field. +func ByFileExt(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldFileExt, opts...).ToFunc() +} + +// ByFileMd5 orders the results by the file_md5 field. +func ByFileMd5(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldFileMd5, opts...).ToFunc() +} + +// ByFileSize orders the results by the file_size field. +func ByFileSize(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldFileSize, opts...).ToFunc() +} + +// ByMimeType orders the results by the mime_type field. +func ByMimeType(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldMimeType, opts...).ToFunc() +} + +// ByUploadedBy orders the results by the uploaded_by field. +func ByUploadedBy(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldUploadedBy, opts...).ToFunc() +} + +// ByArchived orders the results by the archived field. +func ByArchived(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldArchived, opts...).ToFunc() +} + +// ByArchivedAt orders the results by the archived_at field. +func ByArchivedAt(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldArchivedAt, opts...).ToFunc() +} + +// ByDeleted orders the results by the deleted field. +func ByDeleted(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldDeleted, opts...).ToFunc() +} + +// ByDeletedAt orders the results by the deleted_at field. +func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldDeletedAt, opts...).ToFunc() +} + +// ByDeletedBy orders the results by the deleted_by field. +func ByDeletedBy(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldDeletedBy, opts...).ToFunc() +} + +// ByCreatedAt orders the results by the created_at field. +func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldCreatedAt, opts...).ToFunc() +} diff --git a/bj_power_wms/attachment/where.go b/bj_power_wms/attachment/where.go new file mode 100644 index 0000000..b33c6cf --- /dev/null +++ b/bj_power_wms/attachment/where.go @@ -0,0 +1,1059 @@ +// Code generated by ent, DO NOT EDIT. + +package attachment + +import ( + "bj_power_wms/predicate" + + "entgo.io/ent/dialect/sql" +) + +// ID filters vertices based on their ID field. +func ID(id int) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldID, id)) +} + +// IDEQ applies the EQ predicate on the ID field. +func IDEQ(id int) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldID, id)) +} + +// IDNEQ applies the NEQ predicate on the ID field. +func IDNEQ(id int) predicate.Attachment { + return predicate.Attachment(sql.FieldNEQ(FieldID, id)) +} + +// IDIn applies the In predicate on the ID field. +func IDIn(ids ...int) predicate.Attachment { + return predicate.Attachment(sql.FieldIn(FieldID, ids...)) +} + +// IDNotIn applies the NotIn predicate on the ID field. +func IDNotIn(ids ...int) predicate.Attachment { + return predicate.Attachment(sql.FieldNotIn(FieldID, ids...)) +} + +// IDGT applies the GT predicate on the ID field. +func IDGT(id int) predicate.Attachment { + return predicate.Attachment(sql.FieldGT(FieldID, id)) +} + +// IDGTE applies the GTE predicate on the ID field. +func IDGTE(id int) predicate.Attachment { + return predicate.Attachment(sql.FieldGTE(FieldID, id)) +} + +// IDLT applies the LT predicate on the ID field. +func IDLT(id int) predicate.Attachment { + return predicate.Attachment(sql.FieldLT(FieldID, id)) +} + +// IDLTE applies the LTE predicate on the ID field. +func IDLTE(id int) predicate.Attachment { + return predicate.Attachment(sql.FieldLTE(FieldID, id)) +} + +// BizType applies equality check predicate on the "biz_type" field. It's identical to BizTypeEQ. +func BizType(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldBizType, v)) +} + +// BizID applies equality check predicate on the "biz_id" field. It's identical to BizIDEQ. +func BizID(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldBizID, v)) +} + +// FileName applies equality check predicate on the "file_name" field. It's identical to FileNameEQ. +func FileName(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldFileName, v)) +} + +// FilePath applies equality check predicate on the "file_path" field. It's identical to FilePathEQ. +func FilePath(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldFilePath, v)) +} + +// FileType applies equality check predicate on the "file_type" field. It's identical to FileTypeEQ. +func FileType(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldFileType, v)) +} + +// FileExt applies equality check predicate on the "file_ext" field. It's identical to FileExtEQ. +func FileExt(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldFileExt, v)) +} + +// FileMd5 applies equality check predicate on the "file_md5" field. It's identical to FileMd5EQ. +func FileMd5(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldFileMd5, v)) +} + +// FileSize applies equality check predicate on the "file_size" field. It's identical to FileSizeEQ. +func FileSize(v int64) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldFileSize, v)) +} + +// MimeType applies equality check predicate on the "mime_type" field. It's identical to MimeTypeEQ. +func MimeType(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldMimeType, v)) +} + +// UploadedBy applies equality check predicate on the "uploaded_by" field. It's identical to UploadedByEQ. +func UploadedBy(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldUploadedBy, v)) +} + +// Archived applies equality check predicate on the "archived" field. It's identical to ArchivedEQ. +func Archived(v bool) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldArchived, v)) +} + +// ArchivedAt applies equality check predicate on the "archived_at" field. It's identical to ArchivedAtEQ. +func ArchivedAt(v int64) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldArchivedAt, v)) +} + +// Deleted applies equality check predicate on the "deleted" field. It's identical to DeletedEQ. +func Deleted(v bool) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldDeleted, v)) +} + +// DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ. +func DeletedAt(v int64) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldDeletedAt, v)) +} + +// DeletedBy applies equality check predicate on the "deleted_by" field. It's identical to DeletedByEQ. +func DeletedBy(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldDeletedBy, v)) +} + +// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ. +func CreatedAt(v int64) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldCreatedAt, v)) +} + +// BizTypeEQ applies the EQ predicate on the "biz_type" field. +func BizTypeEQ(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldBizType, v)) +} + +// BizTypeNEQ applies the NEQ predicate on the "biz_type" field. +func BizTypeNEQ(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldNEQ(FieldBizType, v)) +} + +// BizTypeIn applies the In predicate on the "biz_type" field. +func BizTypeIn(vs ...string) predicate.Attachment { + return predicate.Attachment(sql.FieldIn(FieldBizType, vs...)) +} + +// BizTypeNotIn applies the NotIn predicate on the "biz_type" field. +func BizTypeNotIn(vs ...string) predicate.Attachment { + return predicate.Attachment(sql.FieldNotIn(FieldBizType, vs...)) +} + +// BizTypeGT applies the GT predicate on the "biz_type" field. +func BizTypeGT(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldGT(FieldBizType, v)) +} + +// BizTypeGTE applies the GTE predicate on the "biz_type" field. +func BizTypeGTE(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldGTE(FieldBizType, v)) +} + +// BizTypeLT applies the LT predicate on the "biz_type" field. +func BizTypeLT(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldLT(FieldBizType, v)) +} + +// BizTypeLTE applies the LTE predicate on the "biz_type" field. +func BizTypeLTE(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldLTE(FieldBizType, v)) +} + +// BizTypeContains applies the Contains predicate on the "biz_type" field. +func BizTypeContains(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldContains(FieldBizType, v)) +} + +// BizTypeHasPrefix applies the HasPrefix predicate on the "biz_type" field. +func BizTypeHasPrefix(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldHasPrefix(FieldBizType, v)) +} + +// BizTypeHasSuffix applies the HasSuffix predicate on the "biz_type" field. +func BizTypeHasSuffix(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldHasSuffix(FieldBizType, v)) +} + +// BizTypeEqualFold applies the EqualFold predicate on the "biz_type" field. +func BizTypeEqualFold(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEqualFold(FieldBizType, v)) +} + +// BizTypeContainsFold applies the ContainsFold predicate on the "biz_type" field. +func BizTypeContainsFold(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldContainsFold(FieldBizType, v)) +} + +// BizIDEQ applies the EQ predicate on the "biz_id" field. +func BizIDEQ(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldBizID, v)) +} + +// BizIDNEQ applies the NEQ predicate on the "biz_id" field. +func BizIDNEQ(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldNEQ(FieldBizID, v)) +} + +// BizIDIn applies the In predicate on the "biz_id" field. +func BizIDIn(vs ...string) predicate.Attachment { + return predicate.Attachment(sql.FieldIn(FieldBizID, vs...)) +} + +// BizIDNotIn applies the NotIn predicate on the "biz_id" field. +func BizIDNotIn(vs ...string) predicate.Attachment { + return predicate.Attachment(sql.FieldNotIn(FieldBizID, vs...)) +} + +// BizIDGT applies the GT predicate on the "biz_id" field. +func BizIDGT(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldGT(FieldBizID, v)) +} + +// BizIDGTE applies the GTE predicate on the "biz_id" field. +func BizIDGTE(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldGTE(FieldBizID, v)) +} + +// BizIDLT applies the LT predicate on the "biz_id" field. +func BizIDLT(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldLT(FieldBizID, v)) +} + +// BizIDLTE applies the LTE predicate on the "biz_id" field. +func BizIDLTE(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldLTE(FieldBizID, v)) +} + +// BizIDContains applies the Contains predicate on the "biz_id" field. +func BizIDContains(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldContains(FieldBizID, v)) +} + +// BizIDHasPrefix applies the HasPrefix predicate on the "biz_id" field. +func BizIDHasPrefix(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldHasPrefix(FieldBizID, v)) +} + +// BizIDHasSuffix applies the HasSuffix predicate on the "biz_id" field. +func BizIDHasSuffix(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldHasSuffix(FieldBizID, v)) +} + +// BizIDEqualFold applies the EqualFold predicate on the "biz_id" field. +func BizIDEqualFold(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEqualFold(FieldBizID, v)) +} + +// BizIDContainsFold applies the ContainsFold predicate on the "biz_id" field. +func BizIDContainsFold(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldContainsFold(FieldBizID, v)) +} + +// FileNameEQ applies the EQ predicate on the "file_name" field. +func FileNameEQ(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldFileName, v)) +} + +// FileNameNEQ applies the NEQ predicate on the "file_name" field. +func FileNameNEQ(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldNEQ(FieldFileName, v)) +} + +// FileNameIn applies the In predicate on the "file_name" field. +func FileNameIn(vs ...string) predicate.Attachment { + return predicate.Attachment(sql.FieldIn(FieldFileName, vs...)) +} + +// FileNameNotIn applies the NotIn predicate on the "file_name" field. +func FileNameNotIn(vs ...string) predicate.Attachment { + return predicate.Attachment(sql.FieldNotIn(FieldFileName, vs...)) +} + +// FileNameGT applies the GT predicate on the "file_name" field. +func FileNameGT(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldGT(FieldFileName, v)) +} + +// FileNameGTE applies the GTE predicate on the "file_name" field. +func FileNameGTE(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldGTE(FieldFileName, v)) +} + +// FileNameLT applies the LT predicate on the "file_name" field. +func FileNameLT(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldLT(FieldFileName, v)) +} + +// FileNameLTE applies the LTE predicate on the "file_name" field. +func FileNameLTE(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldLTE(FieldFileName, v)) +} + +// FileNameContains applies the Contains predicate on the "file_name" field. +func FileNameContains(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldContains(FieldFileName, v)) +} + +// FileNameHasPrefix applies the HasPrefix predicate on the "file_name" field. +func FileNameHasPrefix(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldHasPrefix(FieldFileName, v)) +} + +// FileNameHasSuffix applies the HasSuffix predicate on the "file_name" field. +func FileNameHasSuffix(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldHasSuffix(FieldFileName, v)) +} + +// FileNameEqualFold applies the EqualFold predicate on the "file_name" field. +func FileNameEqualFold(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEqualFold(FieldFileName, v)) +} + +// FileNameContainsFold applies the ContainsFold predicate on the "file_name" field. +func FileNameContainsFold(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldContainsFold(FieldFileName, v)) +} + +// FilePathEQ applies the EQ predicate on the "file_path" field. +func FilePathEQ(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldFilePath, v)) +} + +// FilePathNEQ applies the NEQ predicate on the "file_path" field. +func FilePathNEQ(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldNEQ(FieldFilePath, v)) +} + +// FilePathIn applies the In predicate on the "file_path" field. +func FilePathIn(vs ...string) predicate.Attachment { + return predicate.Attachment(sql.FieldIn(FieldFilePath, vs...)) +} + +// FilePathNotIn applies the NotIn predicate on the "file_path" field. +func FilePathNotIn(vs ...string) predicate.Attachment { + return predicate.Attachment(sql.FieldNotIn(FieldFilePath, vs...)) +} + +// FilePathGT applies the GT predicate on the "file_path" field. +func FilePathGT(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldGT(FieldFilePath, v)) +} + +// FilePathGTE applies the GTE predicate on the "file_path" field. +func FilePathGTE(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldGTE(FieldFilePath, v)) +} + +// FilePathLT applies the LT predicate on the "file_path" field. +func FilePathLT(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldLT(FieldFilePath, v)) +} + +// FilePathLTE applies the LTE predicate on the "file_path" field. +func FilePathLTE(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldLTE(FieldFilePath, v)) +} + +// FilePathContains applies the Contains predicate on the "file_path" field. +func FilePathContains(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldContains(FieldFilePath, v)) +} + +// FilePathHasPrefix applies the HasPrefix predicate on the "file_path" field. +func FilePathHasPrefix(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldHasPrefix(FieldFilePath, v)) +} + +// FilePathHasSuffix applies the HasSuffix predicate on the "file_path" field. +func FilePathHasSuffix(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldHasSuffix(FieldFilePath, v)) +} + +// FilePathEqualFold applies the EqualFold predicate on the "file_path" field. +func FilePathEqualFold(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEqualFold(FieldFilePath, v)) +} + +// FilePathContainsFold applies the ContainsFold predicate on the "file_path" field. +func FilePathContainsFold(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldContainsFold(FieldFilePath, v)) +} + +// FileTypeEQ applies the EQ predicate on the "file_type" field. +func FileTypeEQ(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldFileType, v)) +} + +// FileTypeNEQ applies the NEQ predicate on the "file_type" field. +func FileTypeNEQ(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldNEQ(FieldFileType, v)) +} + +// FileTypeIn applies the In predicate on the "file_type" field. +func FileTypeIn(vs ...string) predicate.Attachment { + return predicate.Attachment(sql.FieldIn(FieldFileType, vs...)) +} + +// FileTypeNotIn applies the NotIn predicate on the "file_type" field. +func FileTypeNotIn(vs ...string) predicate.Attachment { + return predicate.Attachment(sql.FieldNotIn(FieldFileType, vs...)) +} + +// FileTypeGT applies the GT predicate on the "file_type" field. +func FileTypeGT(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldGT(FieldFileType, v)) +} + +// FileTypeGTE applies the GTE predicate on the "file_type" field. +func FileTypeGTE(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldGTE(FieldFileType, v)) +} + +// FileTypeLT applies the LT predicate on the "file_type" field. +func FileTypeLT(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldLT(FieldFileType, v)) +} + +// FileTypeLTE applies the LTE predicate on the "file_type" field. +func FileTypeLTE(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldLTE(FieldFileType, v)) +} + +// FileTypeContains applies the Contains predicate on the "file_type" field. +func FileTypeContains(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldContains(FieldFileType, v)) +} + +// FileTypeHasPrefix applies the HasPrefix predicate on the "file_type" field. +func FileTypeHasPrefix(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldHasPrefix(FieldFileType, v)) +} + +// FileTypeHasSuffix applies the HasSuffix predicate on the "file_type" field. +func FileTypeHasSuffix(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldHasSuffix(FieldFileType, v)) +} + +// FileTypeIsNil applies the IsNil predicate on the "file_type" field. +func FileTypeIsNil() predicate.Attachment { + return predicate.Attachment(sql.FieldIsNull(FieldFileType)) +} + +// FileTypeNotNil applies the NotNil predicate on the "file_type" field. +func FileTypeNotNil() predicate.Attachment { + return predicate.Attachment(sql.FieldNotNull(FieldFileType)) +} + +// FileTypeEqualFold applies the EqualFold predicate on the "file_type" field. +func FileTypeEqualFold(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEqualFold(FieldFileType, v)) +} + +// FileTypeContainsFold applies the ContainsFold predicate on the "file_type" field. +func FileTypeContainsFold(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldContainsFold(FieldFileType, v)) +} + +// FileExtEQ applies the EQ predicate on the "file_ext" field. +func FileExtEQ(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldFileExt, v)) +} + +// FileExtNEQ applies the NEQ predicate on the "file_ext" field. +func FileExtNEQ(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldNEQ(FieldFileExt, v)) +} + +// FileExtIn applies the In predicate on the "file_ext" field. +func FileExtIn(vs ...string) predicate.Attachment { + return predicate.Attachment(sql.FieldIn(FieldFileExt, vs...)) +} + +// FileExtNotIn applies the NotIn predicate on the "file_ext" field. +func FileExtNotIn(vs ...string) predicate.Attachment { + return predicate.Attachment(sql.FieldNotIn(FieldFileExt, vs...)) +} + +// FileExtGT applies the GT predicate on the "file_ext" field. +func FileExtGT(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldGT(FieldFileExt, v)) +} + +// FileExtGTE applies the GTE predicate on the "file_ext" field. +func FileExtGTE(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldGTE(FieldFileExt, v)) +} + +// FileExtLT applies the LT predicate on the "file_ext" field. +func FileExtLT(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldLT(FieldFileExt, v)) +} + +// FileExtLTE applies the LTE predicate on the "file_ext" field. +func FileExtLTE(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldLTE(FieldFileExt, v)) +} + +// FileExtContains applies the Contains predicate on the "file_ext" field. +func FileExtContains(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldContains(FieldFileExt, v)) +} + +// FileExtHasPrefix applies the HasPrefix predicate on the "file_ext" field. +func FileExtHasPrefix(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldHasPrefix(FieldFileExt, v)) +} + +// FileExtHasSuffix applies the HasSuffix predicate on the "file_ext" field. +func FileExtHasSuffix(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldHasSuffix(FieldFileExt, v)) +} + +// FileExtIsNil applies the IsNil predicate on the "file_ext" field. +func FileExtIsNil() predicate.Attachment { + return predicate.Attachment(sql.FieldIsNull(FieldFileExt)) +} + +// FileExtNotNil applies the NotNil predicate on the "file_ext" field. +func FileExtNotNil() predicate.Attachment { + return predicate.Attachment(sql.FieldNotNull(FieldFileExt)) +} + +// FileExtEqualFold applies the EqualFold predicate on the "file_ext" field. +func FileExtEqualFold(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEqualFold(FieldFileExt, v)) +} + +// FileExtContainsFold applies the ContainsFold predicate on the "file_ext" field. +func FileExtContainsFold(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldContainsFold(FieldFileExt, v)) +} + +// FileMd5EQ applies the EQ predicate on the "file_md5" field. +func FileMd5EQ(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldFileMd5, v)) +} + +// FileMd5NEQ applies the NEQ predicate on the "file_md5" field. +func FileMd5NEQ(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldNEQ(FieldFileMd5, v)) +} + +// FileMd5In applies the In predicate on the "file_md5" field. +func FileMd5In(vs ...string) predicate.Attachment { + return predicate.Attachment(sql.FieldIn(FieldFileMd5, vs...)) +} + +// FileMd5NotIn applies the NotIn predicate on the "file_md5" field. +func FileMd5NotIn(vs ...string) predicate.Attachment { + return predicate.Attachment(sql.FieldNotIn(FieldFileMd5, vs...)) +} + +// FileMd5GT applies the GT predicate on the "file_md5" field. +func FileMd5GT(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldGT(FieldFileMd5, v)) +} + +// FileMd5GTE applies the GTE predicate on the "file_md5" field. +func FileMd5GTE(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldGTE(FieldFileMd5, v)) +} + +// FileMd5LT applies the LT predicate on the "file_md5" field. +func FileMd5LT(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldLT(FieldFileMd5, v)) +} + +// FileMd5LTE applies the LTE predicate on the "file_md5" field. +func FileMd5LTE(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldLTE(FieldFileMd5, v)) +} + +// FileMd5Contains applies the Contains predicate on the "file_md5" field. +func FileMd5Contains(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldContains(FieldFileMd5, v)) +} + +// FileMd5HasPrefix applies the HasPrefix predicate on the "file_md5" field. +func FileMd5HasPrefix(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldHasPrefix(FieldFileMd5, v)) +} + +// FileMd5HasSuffix applies the HasSuffix predicate on the "file_md5" field. +func FileMd5HasSuffix(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldHasSuffix(FieldFileMd5, v)) +} + +// FileMd5IsNil applies the IsNil predicate on the "file_md5" field. +func FileMd5IsNil() predicate.Attachment { + return predicate.Attachment(sql.FieldIsNull(FieldFileMd5)) +} + +// FileMd5NotNil applies the NotNil predicate on the "file_md5" field. +func FileMd5NotNil() predicate.Attachment { + return predicate.Attachment(sql.FieldNotNull(FieldFileMd5)) +} + +// FileMd5EqualFold applies the EqualFold predicate on the "file_md5" field. +func FileMd5EqualFold(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEqualFold(FieldFileMd5, v)) +} + +// FileMd5ContainsFold applies the ContainsFold predicate on the "file_md5" field. +func FileMd5ContainsFold(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldContainsFold(FieldFileMd5, v)) +} + +// FileSizeEQ applies the EQ predicate on the "file_size" field. +func FileSizeEQ(v int64) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldFileSize, v)) +} + +// FileSizeNEQ applies the NEQ predicate on the "file_size" field. +func FileSizeNEQ(v int64) predicate.Attachment { + return predicate.Attachment(sql.FieldNEQ(FieldFileSize, v)) +} + +// FileSizeIn applies the In predicate on the "file_size" field. +func FileSizeIn(vs ...int64) predicate.Attachment { + return predicate.Attachment(sql.FieldIn(FieldFileSize, vs...)) +} + +// FileSizeNotIn applies the NotIn predicate on the "file_size" field. +func FileSizeNotIn(vs ...int64) predicate.Attachment { + return predicate.Attachment(sql.FieldNotIn(FieldFileSize, vs...)) +} + +// FileSizeGT applies the GT predicate on the "file_size" field. +func FileSizeGT(v int64) predicate.Attachment { + return predicate.Attachment(sql.FieldGT(FieldFileSize, v)) +} + +// FileSizeGTE applies the GTE predicate on the "file_size" field. +func FileSizeGTE(v int64) predicate.Attachment { + return predicate.Attachment(sql.FieldGTE(FieldFileSize, v)) +} + +// FileSizeLT applies the LT predicate on the "file_size" field. +func FileSizeLT(v int64) predicate.Attachment { + return predicate.Attachment(sql.FieldLT(FieldFileSize, v)) +} + +// FileSizeLTE applies the LTE predicate on the "file_size" field. +func FileSizeLTE(v int64) predicate.Attachment { + return predicate.Attachment(sql.FieldLTE(FieldFileSize, v)) +} + +// MimeTypeEQ applies the EQ predicate on the "mime_type" field. +func MimeTypeEQ(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldMimeType, v)) +} + +// MimeTypeNEQ applies the NEQ predicate on the "mime_type" field. +func MimeTypeNEQ(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldNEQ(FieldMimeType, v)) +} + +// MimeTypeIn applies the In predicate on the "mime_type" field. +func MimeTypeIn(vs ...string) predicate.Attachment { + return predicate.Attachment(sql.FieldIn(FieldMimeType, vs...)) +} + +// MimeTypeNotIn applies the NotIn predicate on the "mime_type" field. +func MimeTypeNotIn(vs ...string) predicate.Attachment { + return predicate.Attachment(sql.FieldNotIn(FieldMimeType, vs...)) +} + +// MimeTypeGT applies the GT predicate on the "mime_type" field. +func MimeTypeGT(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldGT(FieldMimeType, v)) +} + +// MimeTypeGTE applies the GTE predicate on the "mime_type" field. +func MimeTypeGTE(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldGTE(FieldMimeType, v)) +} + +// MimeTypeLT applies the LT predicate on the "mime_type" field. +func MimeTypeLT(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldLT(FieldMimeType, v)) +} + +// MimeTypeLTE applies the LTE predicate on the "mime_type" field. +func MimeTypeLTE(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldLTE(FieldMimeType, v)) +} + +// MimeTypeContains applies the Contains predicate on the "mime_type" field. +func MimeTypeContains(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldContains(FieldMimeType, v)) +} + +// MimeTypeHasPrefix applies the HasPrefix predicate on the "mime_type" field. +func MimeTypeHasPrefix(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldHasPrefix(FieldMimeType, v)) +} + +// MimeTypeHasSuffix applies the HasSuffix predicate on the "mime_type" field. +func MimeTypeHasSuffix(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldHasSuffix(FieldMimeType, v)) +} + +// MimeTypeIsNil applies the IsNil predicate on the "mime_type" field. +func MimeTypeIsNil() predicate.Attachment { + return predicate.Attachment(sql.FieldIsNull(FieldMimeType)) +} + +// MimeTypeNotNil applies the NotNil predicate on the "mime_type" field. +func MimeTypeNotNil() predicate.Attachment { + return predicate.Attachment(sql.FieldNotNull(FieldMimeType)) +} + +// MimeTypeEqualFold applies the EqualFold predicate on the "mime_type" field. +func MimeTypeEqualFold(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEqualFold(FieldMimeType, v)) +} + +// MimeTypeContainsFold applies the ContainsFold predicate on the "mime_type" field. +func MimeTypeContainsFold(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldContainsFold(FieldMimeType, v)) +} + +// UploadedByEQ applies the EQ predicate on the "uploaded_by" field. +func UploadedByEQ(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldUploadedBy, v)) +} + +// UploadedByNEQ applies the NEQ predicate on the "uploaded_by" field. +func UploadedByNEQ(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldNEQ(FieldUploadedBy, v)) +} + +// UploadedByIn applies the In predicate on the "uploaded_by" field. +func UploadedByIn(vs ...string) predicate.Attachment { + return predicate.Attachment(sql.FieldIn(FieldUploadedBy, vs...)) +} + +// UploadedByNotIn applies the NotIn predicate on the "uploaded_by" field. +func UploadedByNotIn(vs ...string) predicate.Attachment { + return predicate.Attachment(sql.FieldNotIn(FieldUploadedBy, vs...)) +} + +// UploadedByGT applies the GT predicate on the "uploaded_by" field. +func UploadedByGT(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldGT(FieldUploadedBy, v)) +} + +// UploadedByGTE applies the GTE predicate on the "uploaded_by" field. +func UploadedByGTE(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldGTE(FieldUploadedBy, v)) +} + +// UploadedByLT applies the LT predicate on the "uploaded_by" field. +func UploadedByLT(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldLT(FieldUploadedBy, v)) +} + +// UploadedByLTE applies the LTE predicate on the "uploaded_by" field. +func UploadedByLTE(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldLTE(FieldUploadedBy, v)) +} + +// UploadedByContains applies the Contains predicate on the "uploaded_by" field. +func UploadedByContains(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldContains(FieldUploadedBy, v)) +} + +// UploadedByHasPrefix applies the HasPrefix predicate on the "uploaded_by" field. +func UploadedByHasPrefix(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldHasPrefix(FieldUploadedBy, v)) +} + +// UploadedByHasSuffix applies the HasSuffix predicate on the "uploaded_by" field. +func UploadedByHasSuffix(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldHasSuffix(FieldUploadedBy, v)) +} + +// UploadedByIsNil applies the IsNil predicate on the "uploaded_by" field. +func UploadedByIsNil() predicate.Attachment { + return predicate.Attachment(sql.FieldIsNull(FieldUploadedBy)) +} + +// UploadedByNotNil applies the NotNil predicate on the "uploaded_by" field. +func UploadedByNotNil() predicate.Attachment { + return predicate.Attachment(sql.FieldNotNull(FieldUploadedBy)) +} + +// UploadedByEqualFold applies the EqualFold predicate on the "uploaded_by" field. +func UploadedByEqualFold(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEqualFold(FieldUploadedBy, v)) +} + +// UploadedByContainsFold applies the ContainsFold predicate on the "uploaded_by" field. +func UploadedByContainsFold(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldContainsFold(FieldUploadedBy, v)) +} + +// ArchivedEQ applies the EQ predicate on the "archived" field. +func ArchivedEQ(v bool) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldArchived, v)) +} + +// ArchivedNEQ applies the NEQ predicate on the "archived" field. +func ArchivedNEQ(v bool) predicate.Attachment { + return predicate.Attachment(sql.FieldNEQ(FieldArchived, v)) +} + +// ArchivedAtEQ applies the EQ predicate on the "archived_at" field. +func ArchivedAtEQ(v int64) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldArchivedAt, v)) +} + +// ArchivedAtNEQ applies the NEQ predicate on the "archived_at" field. +func ArchivedAtNEQ(v int64) predicate.Attachment { + return predicate.Attachment(sql.FieldNEQ(FieldArchivedAt, v)) +} + +// ArchivedAtIn applies the In predicate on the "archived_at" field. +func ArchivedAtIn(vs ...int64) predicate.Attachment { + return predicate.Attachment(sql.FieldIn(FieldArchivedAt, vs...)) +} + +// ArchivedAtNotIn applies the NotIn predicate on the "archived_at" field. +func ArchivedAtNotIn(vs ...int64) predicate.Attachment { + return predicate.Attachment(sql.FieldNotIn(FieldArchivedAt, vs...)) +} + +// ArchivedAtGT applies the GT predicate on the "archived_at" field. +func ArchivedAtGT(v int64) predicate.Attachment { + return predicate.Attachment(sql.FieldGT(FieldArchivedAt, v)) +} + +// ArchivedAtGTE applies the GTE predicate on the "archived_at" field. +func ArchivedAtGTE(v int64) predicate.Attachment { + return predicate.Attachment(sql.FieldGTE(FieldArchivedAt, v)) +} + +// ArchivedAtLT applies the LT predicate on the "archived_at" field. +func ArchivedAtLT(v int64) predicate.Attachment { + return predicate.Attachment(sql.FieldLT(FieldArchivedAt, v)) +} + +// ArchivedAtLTE applies the LTE predicate on the "archived_at" field. +func ArchivedAtLTE(v int64) predicate.Attachment { + return predicate.Attachment(sql.FieldLTE(FieldArchivedAt, v)) +} + +// ArchivedAtIsNil applies the IsNil predicate on the "archived_at" field. +func ArchivedAtIsNil() predicate.Attachment { + return predicate.Attachment(sql.FieldIsNull(FieldArchivedAt)) +} + +// ArchivedAtNotNil applies the NotNil predicate on the "archived_at" field. +func ArchivedAtNotNil() predicate.Attachment { + return predicate.Attachment(sql.FieldNotNull(FieldArchivedAt)) +} + +// DeletedEQ applies the EQ predicate on the "deleted" field. +func DeletedEQ(v bool) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldDeleted, v)) +} + +// DeletedNEQ applies the NEQ predicate on the "deleted" field. +func DeletedNEQ(v bool) predicate.Attachment { + return predicate.Attachment(sql.FieldNEQ(FieldDeleted, v)) +} + +// DeletedAtEQ applies the EQ predicate on the "deleted_at" field. +func DeletedAtEQ(v int64) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldDeletedAt, v)) +} + +// DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field. +func DeletedAtNEQ(v int64) predicate.Attachment { + return predicate.Attachment(sql.FieldNEQ(FieldDeletedAt, v)) +} + +// DeletedAtIn applies the In predicate on the "deleted_at" field. +func DeletedAtIn(vs ...int64) predicate.Attachment { + return predicate.Attachment(sql.FieldIn(FieldDeletedAt, vs...)) +} + +// DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field. +func DeletedAtNotIn(vs ...int64) predicate.Attachment { + return predicate.Attachment(sql.FieldNotIn(FieldDeletedAt, vs...)) +} + +// DeletedAtGT applies the GT predicate on the "deleted_at" field. +func DeletedAtGT(v int64) predicate.Attachment { + return predicate.Attachment(sql.FieldGT(FieldDeletedAt, v)) +} + +// DeletedAtGTE applies the GTE predicate on the "deleted_at" field. +func DeletedAtGTE(v int64) predicate.Attachment { + return predicate.Attachment(sql.FieldGTE(FieldDeletedAt, v)) +} + +// DeletedAtLT applies the LT predicate on the "deleted_at" field. +func DeletedAtLT(v int64) predicate.Attachment { + return predicate.Attachment(sql.FieldLT(FieldDeletedAt, v)) +} + +// DeletedAtLTE applies the LTE predicate on the "deleted_at" field. +func DeletedAtLTE(v int64) predicate.Attachment { + return predicate.Attachment(sql.FieldLTE(FieldDeletedAt, v)) +} + +// DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field. +func DeletedAtIsNil() predicate.Attachment { + return predicate.Attachment(sql.FieldIsNull(FieldDeletedAt)) +} + +// DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field. +func DeletedAtNotNil() predicate.Attachment { + return predicate.Attachment(sql.FieldNotNull(FieldDeletedAt)) +} + +// DeletedByEQ applies the EQ predicate on the "deleted_by" field. +func DeletedByEQ(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldDeletedBy, v)) +} + +// DeletedByNEQ applies the NEQ predicate on the "deleted_by" field. +func DeletedByNEQ(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldNEQ(FieldDeletedBy, v)) +} + +// DeletedByIn applies the In predicate on the "deleted_by" field. +func DeletedByIn(vs ...string) predicate.Attachment { + return predicate.Attachment(sql.FieldIn(FieldDeletedBy, vs...)) +} + +// DeletedByNotIn applies the NotIn predicate on the "deleted_by" field. +func DeletedByNotIn(vs ...string) predicate.Attachment { + return predicate.Attachment(sql.FieldNotIn(FieldDeletedBy, vs...)) +} + +// DeletedByGT applies the GT predicate on the "deleted_by" field. +func DeletedByGT(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldGT(FieldDeletedBy, v)) +} + +// DeletedByGTE applies the GTE predicate on the "deleted_by" field. +func DeletedByGTE(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldGTE(FieldDeletedBy, v)) +} + +// DeletedByLT applies the LT predicate on the "deleted_by" field. +func DeletedByLT(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldLT(FieldDeletedBy, v)) +} + +// DeletedByLTE applies the LTE predicate on the "deleted_by" field. +func DeletedByLTE(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldLTE(FieldDeletedBy, v)) +} + +// DeletedByContains applies the Contains predicate on the "deleted_by" field. +func DeletedByContains(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldContains(FieldDeletedBy, v)) +} + +// DeletedByHasPrefix applies the HasPrefix predicate on the "deleted_by" field. +func DeletedByHasPrefix(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldHasPrefix(FieldDeletedBy, v)) +} + +// DeletedByHasSuffix applies the HasSuffix predicate on the "deleted_by" field. +func DeletedByHasSuffix(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldHasSuffix(FieldDeletedBy, v)) +} + +// DeletedByIsNil applies the IsNil predicate on the "deleted_by" field. +func DeletedByIsNil() predicate.Attachment { + return predicate.Attachment(sql.FieldIsNull(FieldDeletedBy)) +} + +// DeletedByNotNil applies the NotNil predicate on the "deleted_by" field. +func DeletedByNotNil() predicate.Attachment { + return predicate.Attachment(sql.FieldNotNull(FieldDeletedBy)) +} + +// DeletedByEqualFold applies the EqualFold predicate on the "deleted_by" field. +func DeletedByEqualFold(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldEqualFold(FieldDeletedBy, v)) +} + +// DeletedByContainsFold applies the ContainsFold predicate on the "deleted_by" field. +func DeletedByContainsFold(v string) predicate.Attachment { + return predicate.Attachment(sql.FieldContainsFold(FieldDeletedBy, v)) +} + +// CreatedAtEQ applies the EQ predicate on the "created_at" field. +func CreatedAtEQ(v int64) predicate.Attachment { + return predicate.Attachment(sql.FieldEQ(FieldCreatedAt, v)) +} + +// CreatedAtNEQ applies the NEQ predicate on the "created_at" field. +func CreatedAtNEQ(v int64) predicate.Attachment { + return predicate.Attachment(sql.FieldNEQ(FieldCreatedAt, v)) +} + +// CreatedAtIn applies the In predicate on the "created_at" field. +func CreatedAtIn(vs ...int64) predicate.Attachment { + return predicate.Attachment(sql.FieldIn(FieldCreatedAt, vs...)) +} + +// CreatedAtNotIn applies the NotIn predicate on the "created_at" field. +func CreatedAtNotIn(vs ...int64) predicate.Attachment { + return predicate.Attachment(sql.FieldNotIn(FieldCreatedAt, vs...)) +} + +// CreatedAtGT applies the GT predicate on the "created_at" field. +func CreatedAtGT(v int64) predicate.Attachment { + return predicate.Attachment(sql.FieldGT(FieldCreatedAt, v)) +} + +// CreatedAtGTE applies the GTE predicate on the "created_at" field. +func CreatedAtGTE(v int64) predicate.Attachment { + return predicate.Attachment(sql.FieldGTE(FieldCreatedAt, v)) +} + +// CreatedAtLT applies the LT predicate on the "created_at" field. +func CreatedAtLT(v int64) predicate.Attachment { + return predicate.Attachment(sql.FieldLT(FieldCreatedAt, v)) +} + +// CreatedAtLTE applies the LTE predicate on the "created_at" field. +func CreatedAtLTE(v int64) predicate.Attachment { + return predicate.Attachment(sql.FieldLTE(FieldCreatedAt, v)) +} + +// And groups predicates with the AND operator between them. +func And(predicates ...predicate.Attachment) predicate.Attachment { + return predicate.Attachment(sql.AndPredicates(predicates...)) +} + +// Or groups predicates with the OR operator between them. +func Or(predicates ...predicate.Attachment) predicate.Attachment { + return predicate.Attachment(sql.OrPredicates(predicates...)) +} + +// Not applies the not operator on the given predicate. +func Not(p predicate.Attachment) predicate.Attachment { + return predicate.Attachment(sql.NotPredicates(p)) +} diff --git a/bj_power_wms/ent/migrate/schema.go b/bj_power_wms/ent/migrate/schema.go index c1cec55..e8ce0be 100644 --- a/bj_power_wms/ent/migrate/schema.go +++ b/bj_power_wms/ent/migrate/schema.go @@ -534,6 +534,7 @@ var ( {Name: "box_no", Type: field.TypeString, Nullable: true}, {Name: "box_sn_list", Type: field.TypeString, Nullable: true}, {Name: "contract_no", Type: field.TypeString, Nullable: true}, + {Name: "inspection_no", Type: field.TypeString, Nullable: true}, {Name: "created_at", Type: field.TypeInt64}, } // OutboundOrdersTable holds the schema information for the "outbound_orders" table. @@ -562,6 +563,11 @@ var ( Unique: false, Columns: []*schema.Column{OutboundOrdersColumns[23]}, }, + { + Name: "outboundorder_inspection_no", + Unique: false, + Columns: []*schema.Column{OutboundOrdersColumns[26]}, + }, }, } // PermissionsColumns holds the columns for the "permissions" table. diff --git a/bj_power_wms/ent/mutation.go b/bj_power_wms/ent/mutation.go index bb5ee74..9d14872 100644 --- a/bj_power_wms/ent/mutation.go +++ b/bj_power_wms/ent/mutation.go @@ -15215,6 +15215,7 @@ type OutboundOrderMutation struct { box_no *string box_sn_list *string contract_no *string + inspection_no *string created_at *int64 addcreated_at *int64 clearedFields map[string]struct{} @@ -16495,6 +16496,55 @@ func (m *OutboundOrderMutation) ResetContractNo() { delete(m.clearedFields, outboundorder.FieldContractNo) } +// SetInspectionNo sets the "inspection_no" field. +func (m *OutboundOrderMutation) SetInspectionNo(s string) { + m.inspection_no = &s +} + +// InspectionNo returns the value of the "inspection_no" field in the mutation. +func (m *OutboundOrderMutation) InspectionNo() (r string, exists bool) { + v := m.inspection_no + if v == nil { + return + } + return *v, true +} + +// OldInspectionNo returns the old "inspection_no" field's value of the OutboundOrder entity. +// If the OutboundOrder object wasn't provided to the builder, the object is fetched from the database. +// An error is returned if the mutation operation is not UpdateOne, or the database query fails. +func (m *OutboundOrderMutation) OldInspectionNo(ctx context.Context) (v string, err error) { + if !m.op.Is(OpUpdateOne) { + return v, errors.New("OldInspectionNo is only allowed on UpdateOne operations") + } + if m.id == nil || m.oldValue == nil { + return v, errors.New("OldInspectionNo requires an ID field in the mutation") + } + oldValue, err := m.oldValue(ctx) + if err != nil { + return v, fmt.Errorf("querying old value for OldInspectionNo: %w", err) + } + return oldValue.InspectionNo, nil +} + +// ClearInspectionNo clears the value of the "inspection_no" field. +func (m *OutboundOrderMutation) ClearInspectionNo() { + m.inspection_no = nil + m.clearedFields[outboundorder.FieldInspectionNo] = struct{}{} +} + +// InspectionNoCleared returns if the "inspection_no" field was cleared in this mutation. +func (m *OutboundOrderMutation) InspectionNoCleared() bool { + _, ok := m.clearedFields[outboundorder.FieldInspectionNo] + return ok +} + +// ResetInspectionNo resets all changes to the "inspection_no" field. +func (m *OutboundOrderMutation) ResetInspectionNo() { + m.inspection_no = nil + delete(m.clearedFields, outboundorder.FieldInspectionNo) +} + // SetCreatedAt sets the "created_at" field. func (m *OutboundOrderMutation) SetCreatedAt(i int64) { m.created_at = &i @@ -16585,7 +16635,7 @@ func (m *OutboundOrderMutation) Type() string { // order to get all numeric fields that were incremented/decremented, call // AddedFields(). func (m *OutboundOrderMutation) Fields() []string { - fields := make([]string, 0, 26) + fields := make([]string, 0, 27) if m.outbound_no != nil { fields = append(fields, outboundorder.FieldOutboundNo) } @@ -16661,6 +16711,9 @@ func (m *OutboundOrderMutation) Fields() []string { if m.contract_no != nil { fields = append(fields, outboundorder.FieldContractNo) } + if m.inspection_no != nil { + fields = append(fields, outboundorder.FieldInspectionNo) + } if m.created_at != nil { fields = append(fields, outboundorder.FieldCreatedAt) } @@ -16722,6 +16775,8 @@ func (m *OutboundOrderMutation) Field(name string) (ent.Value, bool) { return m.BoxSnList() case outboundorder.FieldContractNo: return m.ContractNo() + case outboundorder.FieldInspectionNo: + return m.InspectionNo() case outboundorder.FieldCreatedAt: return m.CreatedAt() } @@ -16783,6 +16838,8 @@ func (m *OutboundOrderMutation) OldField(ctx context.Context, name string) (ent. return m.OldBoxSnList(ctx) case outboundorder.FieldContractNo: return m.OldContractNo(ctx) + case outboundorder.FieldInspectionNo: + return m.OldInspectionNo(ctx) case outboundorder.FieldCreatedAt: return m.OldCreatedAt(ctx) } @@ -16969,6 +17026,13 @@ func (m *OutboundOrderMutation) SetField(name string, value ent.Value) error { } m.SetContractNo(v) return nil + case outboundorder.FieldInspectionNo: + v, ok := value.(string) + if !ok { + return fmt.Errorf("unexpected type %T for field %s", value, name) + } + m.SetInspectionNo(v) + return nil case outboundorder.FieldCreatedAt: v, ok := value.(int64) if !ok { @@ -17099,6 +17163,9 @@ func (m *OutboundOrderMutation) ClearedFields() []string { if m.FieldCleared(outboundorder.FieldContractNo) { fields = append(fields, outboundorder.FieldContractNo) } + if m.FieldCleared(outboundorder.FieldInspectionNo) { + fields = append(fields, outboundorder.FieldInspectionNo) + } return fields } @@ -17167,6 +17234,9 @@ func (m *OutboundOrderMutation) ClearField(name string) error { case outboundorder.FieldContractNo: m.ClearContractNo() return nil + case outboundorder.FieldInspectionNo: + m.ClearInspectionNo() + return nil } return fmt.Errorf("unknown OutboundOrder nullable field %s", name) } @@ -17250,6 +17320,9 @@ func (m *OutboundOrderMutation) ResetField(name string) error { case outboundorder.FieldContractNo: m.ResetContractNo() return nil + case outboundorder.FieldInspectionNo: + m.ResetInspectionNo() + return nil case outboundorder.FieldCreatedAt: m.ResetCreatedAt() return nil diff --git a/bj_power_wms/ent/outboundorder.go b/bj_power_wms/ent/outboundorder.go index d162637..362abcc 100644 --- a/bj_power_wms/ent/outboundorder.go +++ b/bj_power_wms/ent/outboundorder.go @@ -66,6 +66,8 @@ type OutboundOrder struct { BoxSnList string `json:"boxSnList,omitempty"` // 合同号(装箱选填) ContractNo string `json:"contractNo,omitempty"` + // 检测单号(溯源关联检验单据) + InspectionNo string `json:"inspectionNo,omitempty"` // 创建时间 CreatedAt int64 `json:"createdAt,omitempty"` selectValues sql.SelectValues @@ -80,7 +82,7 @@ func (*OutboundOrder) scanValues(columns []string) ([]any, error) { values[i] = new(sql.NullBool) case outboundorder.FieldID, outboundorder.FieldManageMode, outboundorder.FieldQuantity, outboundorder.FieldCreatedAt: values[i] = new(sql.NullInt64) - case outboundorder.FieldOutboundNo, outboundorder.FieldOutboundType, outboundorder.FieldStatus, outboundorder.FieldOutboundCategory, outboundorder.FieldOwnershipType, outboundorder.FieldOwnershipNo, outboundorder.FieldTargetStation, outboundorder.FieldOrderNo, outboundorder.FieldMaterialCode, outboundorder.FieldMaterialName, outboundorder.FieldBatchNo, outboundorder.FieldZoneCode, outboundorder.FieldShelfNo, outboundorder.FieldLayerNo, outboundorder.FieldPositionNo, outboundorder.FieldOperator, outboundorder.FieldReviewer, outboundorder.FieldTargetDock, outboundorder.FieldRemark, outboundorder.FieldBoxNo, outboundorder.FieldBoxSnList, outboundorder.FieldContractNo: + case outboundorder.FieldOutboundNo, outboundorder.FieldOutboundType, outboundorder.FieldStatus, outboundorder.FieldOutboundCategory, outboundorder.FieldOwnershipType, outboundorder.FieldOwnershipNo, outboundorder.FieldTargetStation, outboundorder.FieldOrderNo, outboundorder.FieldMaterialCode, outboundorder.FieldMaterialName, outboundorder.FieldBatchNo, outboundorder.FieldZoneCode, outboundorder.FieldShelfNo, outboundorder.FieldLayerNo, outboundorder.FieldPositionNo, outboundorder.FieldOperator, outboundorder.FieldReviewer, outboundorder.FieldTargetDock, outboundorder.FieldRemark, outboundorder.FieldBoxNo, outboundorder.FieldBoxSnList, outboundorder.FieldContractNo, outboundorder.FieldInspectionNo: values[i] = new(sql.NullString) default: values[i] = new(sql.UnknownType) @@ -253,6 +255,12 @@ func (_m *OutboundOrder) assignValues(columns []string, values []any) error { } else if value.Valid { _m.ContractNo = value.String } + case outboundorder.FieldInspectionNo: + if value, ok := values[i].(*sql.NullString); !ok { + return fmt.Errorf("unexpected type %T for field inspection_no", values[i]) + } else if value.Valid { + _m.InspectionNo = value.String + } case outboundorder.FieldCreatedAt: if value, ok := values[i].(*sql.NullInt64); !ok { return fmt.Errorf("unexpected type %T for field created_at", values[i]) @@ -370,6 +378,9 @@ func (_m *OutboundOrder) String() string { builder.WriteString("contract_no=") builder.WriteString(_m.ContractNo) builder.WriteString(", ") + builder.WriteString("inspection_no=") + builder.WriteString(_m.InspectionNo) + builder.WriteString(", ") builder.WriteString("created_at=") builder.WriteString(fmt.Sprintf("%v", _m.CreatedAt)) builder.WriteByte(')') diff --git a/bj_power_wms/ent/outboundorder/outboundorder.go b/bj_power_wms/ent/outboundorder/outboundorder.go index 08a33b6..1f163b2 100644 --- a/bj_power_wms/ent/outboundorder/outboundorder.go +++ b/bj_power_wms/ent/outboundorder/outboundorder.go @@ -61,6 +61,8 @@ const ( FieldBoxSnList = "box_sn_list" // FieldContractNo holds the string denoting the contract_no field in the database. FieldContractNo = "contract_no" + // FieldInspectionNo holds the string denoting the inspection_no field in the database. + FieldInspectionNo = "inspection_no" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // Table holds the table name of the outboundorder in the database. @@ -95,6 +97,7 @@ var Columns = []string{ FieldBoxNo, FieldBoxSnList, FieldContractNo, + FieldInspectionNo, FieldCreatedAt, } @@ -256,6 +259,11 @@ func ByContractNo(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldContractNo, opts...).ToFunc() } +// ByInspectionNo orders the results by the inspection_no field. +func ByInspectionNo(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldInspectionNo, opts...).ToFunc() +} + // ByCreatedAt orders the results by the created_at field. func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldCreatedAt, opts...).ToFunc() diff --git a/bj_power_wms/ent/outboundorder/where.go b/bj_power_wms/ent/outboundorder/where.go index 190c3d8..43c540c 100644 --- a/bj_power_wms/ent/outboundorder/where.go +++ b/bj_power_wms/ent/outboundorder/where.go @@ -178,6 +178,11 @@ func ContractNo(v string) predicate.OutboundOrder { return predicate.OutboundOrder(sql.FieldEQ(FieldContractNo, v)) } +// InspectionNo applies equality check predicate on the "inspection_no" field. It's identical to InspectionNoEQ. +func InspectionNo(v string) predicate.OutboundOrder { + return predicate.OutboundOrder(sql.FieldEQ(FieldInspectionNo, v)) +} + // CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ. func CreatedAt(v int64) predicate.OutboundOrder { return predicate.OutboundOrder(sql.FieldEQ(FieldCreatedAt, v)) @@ -1883,6 +1888,81 @@ func ContractNoContainsFold(v string) predicate.OutboundOrder { return predicate.OutboundOrder(sql.FieldContainsFold(FieldContractNo, v)) } +// InspectionNoEQ applies the EQ predicate on the "inspection_no" field. +func InspectionNoEQ(v string) predicate.OutboundOrder { + return predicate.OutboundOrder(sql.FieldEQ(FieldInspectionNo, v)) +} + +// InspectionNoNEQ applies the NEQ predicate on the "inspection_no" field. +func InspectionNoNEQ(v string) predicate.OutboundOrder { + return predicate.OutboundOrder(sql.FieldNEQ(FieldInspectionNo, v)) +} + +// InspectionNoIn applies the In predicate on the "inspection_no" field. +func InspectionNoIn(vs ...string) predicate.OutboundOrder { + return predicate.OutboundOrder(sql.FieldIn(FieldInspectionNo, vs...)) +} + +// InspectionNoNotIn applies the NotIn predicate on the "inspection_no" field. +func InspectionNoNotIn(vs ...string) predicate.OutboundOrder { + return predicate.OutboundOrder(sql.FieldNotIn(FieldInspectionNo, vs...)) +} + +// InspectionNoGT applies the GT predicate on the "inspection_no" field. +func InspectionNoGT(v string) predicate.OutboundOrder { + return predicate.OutboundOrder(sql.FieldGT(FieldInspectionNo, v)) +} + +// InspectionNoGTE applies the GTE predicate on the "inspection_no" field. +func InspectionNoGTE(v string) predicate.OutboundOrder { + return predicate.OutboundOrder(sql.FieldGTE(FieldInspectionNo, v)) +} + +// InspectionNoLT applies the LT predicate on the "inspection_no" field. +func InspectionNoLT(v string) predicate.OutboundOrder { + return predicate.OutboundOrder(sql.FieldLT(FieldInspectionNo, v)) +} + +// InspectionNoLTE applies the LTE predicate on the "inspection_no" field. +func InspectionNoLTE(v string) predicate.OutboundOrder { + return predicate.OutboundOrder(sql.FieldLTE(FieldInspectionNo, v)) +} + +// InspectionNoContains applies the Contains predicate on the "inspection_no" field. +func InspectionNoContains(v string) predicate.OutboundOrder { + return predicate.OutboundOrder(sql.FieldContains(FieldInspectionNo, v)) +} + +// InspectionNoHasPrefix applies the HasPrefix predicate on the "inspection_no" field. +func InspectionNoHasPrefix(v string) predicate.OutboundOrder { + return predicate.OutboundOrder(sql.FieldHasPrefix(FieldInspectionNo, v)) +} + +// InspectionNoHasSuffix applies the HasSuffix predicate on the "inspection_no" field. +func InspectionNoHasSuffix(v string) predicate.OutboundOrder { + return predicate.OutboundOrder(sql.FieldHasSuffix(FieldInspectionNo, v)) +} + +// InspectionNoIsNil applies the IsNil predicate on the "inspection_no" field. +func InspectionNoIsNil() predicate.OutboundOrder { + return predicate.OutboundOrder(sql.FieldIsNull(FieldInspectionNo)) +} + +// InspectionNoNotNil applies the NotNil predicate on the "inspection_no" field. +func InspectionNoNotNil() predicate.OutboundOrder { + return predicate.OutboundOrder(sql.FieldNotNull(FieldInspectionNo)) +} + +// InspectionNoEqualFold applies the EqualFold predicate on the "inspection_no" field. +func InspectionNoEqualFold(v string) predicate.OutboundOrder { + return predicate.OutboundOrder(sql.FieldEqualFold(FieldInspectionNo, v)) +} + +// InspectionNoContainsFold applies the ContainsFold predicate on the "inspection_no" field. +func InspectionNoContainsFold(v string) predicate.OutboundOrder { + return predicate.OutboundOrder(sql.FieldContainsFold(FieldInspectionNo, v)) +} + // CreatedAtEQ applies the EQ predicate on the "created_at" field. func CreatedAtEQ(v int64) predicate.OutboundOrder { return predicate.OutboundOrder(sql.FieldEQ(FieldCreatedAt, v)) diff --git a/bj_power_wms/ent/outboundorder_create.go b/bj_power_wms/ent/outboundorder_create.go index 341a5d0..7866295 100644 --- a/bj_power_wms/ent/outboundorder_create.go +++ b/bj_power_wms/ent/outboundorder_create.go @@ -355,6 +355,20 @@ func (_c *OutboundOrderCreate) SetNillableContractNo(v *string) *OutboundOrderCr return _c } +// SetInspectionNo sets the "inspection_no" field. +func (_c *OutboundOrderCreate) SetInspectionNo(v string) *OutboundOrderCreate { + _c.mutation.SetInspectionNo(v) + return _c +} + +// SetNillableInspectionNo sets the "inspection_no" field if the given value is not nil. +func (_c *OutboundOrderCreate) SetNillableInspectionNo(v *string) *OutboundOrderCreate { + if v != nil { + _c.SetInspectionNo(*v) + } + return _c +} + // SetCreatedAt sets the "created_at" field. func (_c *OutboundOrderCreate) SetCreatedAt(v int64) *OutboundOrderCreate { _c.mutation.SetCreatedAt(v) @@ -583,6 +597,10 @@ func (_c *OutboundOrderCreate) createSpec() (*OutboundOrder, *sqlgraph.CreateSpe _spec.SetField(outboundorder.FieldContractNo, field.TypeString, value) _node.ContractNo = value } + if value, ok := _c.mutation.InspectionNo(); ok { + _spec.SetField(outboundorder.FieldInspectionNo, field.TypeString, value) + _node.InspectionNo = value + } if value, ok := _c.mutation.CreatedAt(); ok { _spec.SetField(outboundorder.FieldCreatedAt, field.TypeInt64, value) _node.CreatedAt = value @@ -1059,6 +1077,24 @@ func (u *OutboundOrderUpsert) ClearContractNo() *OutboundOrderUpsert { return u } +// SetInspectionNo sets the "inspection_no" field. +func (u *OutboundOrderUpsert) SetInspectionNo(v string) *OutboundOrderUpsert { + u.Set(outboundorder.FieldInspectionNo, v) + return u +} + +// UpdateInspectionNo sets the "inspection_no" field to the value that was provided on create. +func (u *OutboundOrderUpsert) UpdateInspectionNo() *OutboundOrderUpsert { + u.SetExcluded(outboundorder.FieldInspectionNo) + return u +} + +// ClearInspectionNo clears the value of the "inspection_no" field. +func (u *OutboundOrderUpsert) ClearInspectionNo() *OutboundOrderUpsert { + u.SetNull(outboundorder.FieldInspectionNo) + return u +} + // SetCreatedAt sets the "created_at" field. func (u *OutboundOrderUpsert) SetCreatedAt(v int64) *OutboundOrderUpsert { u.Set(outboundorder.FieldCreatedAt, v) @@ -1607,6 +1643,27 @@ func (u *OutboundOrderUpsertOne) ClearContractNo() *OutboundOrderUpsertOne { }) } +// SetInspectionNo sets the "inspection_no" field. +func (u *OutboundOrderUpsertOne) SetInspectionNo(v string) *OutboundOrderUpsertOne { + return u.Update(func(s *OutboundOrderUpsert) { + s.SetInspectionNo(v) + }) +} + +// UpdateInspectionNo sets the "inspection_no" field to the value that was provided on create. +func (u *OutboundOrderUpsertOne) UpdateInspectionNo() *OutboundOrderUpsertOne { + return u.Update(func(s *OutboundOrderUpsert) { + s.UpdateInspectionNo() + }) +} + +// ClearInspectionNo clears the value of the "inspection_no" field. +func (u *OutboundOrderUpsertOne) ClearInspectionNo() *OutboundOrderUpsertOne { + return u.Update(func(s *OutboundOrderUpsert) { + s.ClearInspectionNo() + }) +} + // SetCreatedAt sets the "created_at" field. func (u *OutboundOrderUpsertOne) SetCreatedAt(v int64) *OutboundOrderUpsertOne { return u.Update(func(s *OutboundOrderUpsert) { @@ -2322,6 +2379,27 @@ func (u *OutboundOrderUpsertBulk) ClearContractNo() *OutboundOrderUpsertBulk { }) } +// SetInspectionNo sets the "inspection_no" field. +func (u *OutboundOrderUpsertBulk) SetInspectionNo(v string) *OutboundOrderUpsertBulk { + return u.Update(func(s *OutboundOrderUpsert) { + s.SetInspectionNo(v) + }) +} + +// UpdateInspectionNo sets the "inspection_no" field to the value that was provided on create. +func (u *OutboundOrderUpsertBulk) UpdateInspectionNo() *OutboundOrderUpsertBulk { + return u.Update(func(s *OutboundOrderUpsert) { + s.UpdateInspectionNo() + }) +} + +// ClearInspectionNo clears the value of the "inspection_no" field. +func (u *OutboundOrderUpsertBulk) ClearInspectionNo() *OutboundOrderUpsertBulk { + return u.Update(func(s *OutboundOrderUpsert) { + s.ClearInspectionNo() + }) +} + // SetCreatedAt sets the "created_at" field. func (u *OutboundOrderUpsertBulk) SetCreatedAt(v int64) *OutboundOrderUpsertBulk { return u.Update(func(s *OutboundOrderUpsert) { diff --git a/bj_power_wms/ent/outboundorder_update.go b/bj_power_wms/ent/outboundorder_update.go index cc3756d..a457b4a 100644 --- a/bj_power_wms/ent/outboundorder_update.go +++ b/bj_power_wms/ent/outboundorder_update.go @@ -499,6 +499,26 @@ func (_u *OutboundOrderUpdate) ClearContractNo() *OutboundOrderUpdate { return _u } +// SetInspectionNo sets the "inspection_no" field. +func (_u *OutboundOrderUpdate) SetInspectionNo(v string) *OutboundOrderUpdate { + _u.mutation.SetInspectionNo(v) + return _u +} + +// SetNillableInspectionNo sets the "inspection_no" field if the given value is not nil. +func (_u *OutboundOrderUpdate) SetNillableInspectionNo(v *string) *OutboundOrderUpdate { + if v != nil { + _u.SetInspectionNo(*v) + } + return _u +} + +// ClearInspectionNo clears the value of the "inspection_no" field. +func (_u *OutboundOrderUpdate) ClearInspectionNo() *OutboundOrderUpdate { + _u.mutation.ClearInspectionNo() + return _u +} + // SetCreatedAt sets the "created_at" field. func (_u *OutboundOrderUpdate) SetCreatedAt(v int64) *OutboundOrderUpdate { _u.mutation.ResetCreatedAt() @@ -696,6 +716,12 @@ func (_u *OutboundOrderUpdate) sqlSave(ctx context.Context) (_node int, err erro if _u.mutation.ContractNoCleared() { _spec.ClearField(outboundorder.FieldContractNo, field.TypeString) } + if value, ok := _u.mutation.InspectionNo(); ok { + _spec.SetField(outboundorder.FieldInspectionNo, field.TypeString, value) + } + if _u.mutation.InspectionNoCleared() { + _spec.ClearField(outboundorder.FieldInspectionNo, field.TypeString) + } if value, ok := _u.mutation.CreatedAt(); ok { _spec.SetField(outboundorder.FieldCreatedAt, field.TypeInt64, value) } @@ -1194,6 +1220,26 @@ func (_u *OutboundOrderUpdateOne) ClearContractNo() *OutboundOrderUpdateOne { return _u } +// SetInspectionNo sets the "inspection_no" field. +func (_u *OutboundOrderUpdateOne) SetInspectionNo(v string) *OutboundOrderUpdateOne { + _u.mutation.SetInspectionNo(v) + return _u +} + +// SetNillableInspectionNo sets the "inspection_no" field if the given value is not nil. +func (_u *OutboundOrderUpdateOne) SetNillableInspectionNo(v *string) *OutboundOrderUpdateOne { + if v != nil { + _u.SetInspectionNo(*v) + } + return _u +} + +// ClearInspectionNo clears the value of the "inspection_no" field. +func (_u *OutboundOrderUpdateOne) ClearInspectionNo() *OutboundOrderUpdateOne { + _u.mutation.ClearInspectionNo() + return _u +} + // SetCreatedAt sets the "created_at" field. func (_u *OutboundOrderUpdateOne) SetCreatedAt(v int64) *OutboundOrderUpdateOne { _u.mutation.ResetCreatedAt() @@ -1421,6 +1467,12 @@ func (_u *OutboundOrderUpdateOne) sqlSave(ctx context.Context) (_node *OutboundO if _u.mutation.ContractNoCleared() { _spec.ClearField(outboundorder.FieldContractNo, field.TypeString) } + if value, ok := _u.mutation.InspectionNo(); ok { + _spec.SetField(outboundorder.FieldInspectionNo, field.TypeString, value) + } + if _u.mutation.InspectionNoCleared() { + _spec.ClearField(outboundorder.FieldInspectionNo, field.TypeString) + } if value, ok := _u.mutation.CreatedAt(); ok { _spec.SetField(outboundorder.FieldCreatedAt, field.TypeInt64, value) } diff --git a/bj_power_wms/ent/runtime.go b/bj_power_wms/ent/runtime.go index 3e66581..9d58779 100644 --- a/bj_power_wms/ent/runtime.go +++ b/bj_power_wms/ent/runtime.go @@ -390,7 +390,7 @@ func init() { // outboundorder.DefaultQuantity holds the default value on creation for the quantity field. outboundorder.DefaultQuantity = outboundorderDescQuantity.Default.(int) // outboundorderDescCreatedAt is the schema descriptor for created_at field. - outboundorderDescCreatedAt := outboundorderFields[25].Descriptor() + outboundorderDescCreatedAt := outboundorderFields[26].Descriptor() // outboundorder.DefaultCreatedAt holds the default value on creation for the created_at field. outboundorder.DefaultCreatedAt = outboundorderDescCreatedAt.Default.(func() int64) permissionFields := schema.Permission{}.Fields() diff --git a/bj_power_wms/enttest/enttest.go b/bj_power_wms/enttest/enttest.go new file mode 100644 index 0000000..125c010 --- /dev/null +++ b/bj_power_wms/enttest/enttest.go @@ -0,0 +1,85 @@ +// Code generated by ent, DO NOT EDIT. + +package enttest + +import ( + "context" + + "bj_power_wms" + // required by schema hooks. + _ "bj_power_wms/runtime" + + "bj_power_wms/migrate" + + "entgo.io/ent/dialect/sql/schema" +) + +type ( + // TestingT is the interface that is shared between + // testing.T and testing.B and used by enttest. + TestingT interface { + FailNow() + Error(...any) + } + + // Option configures client creation. + Option func(*options) + + options struct { + opts []bj_power_wms.Option + migrateOpts []schema.MigrateOption + } +) + +// WithOptions forwards options to client creation. +func WithOptions(opts ...bj_power_wms.Option) Option { + return func(o *options) { + o.opts = append(o.opts, opts...) + } +} + +// WithMigrateOptions forwards options to auto migration. +func WithMigrateOptions(opts ...schema.MigrateOption) Option { + return func(o *options) { + o.migrateOpts = append(o.migrateOpts, opts...) + } +} + +func newOptions(opts []Option) *options { + o := &options{} + for _, opt := range opts { + opt(o) + } + return o +} + +// Open calls bj_power_wms.Open and auto-run migration. +func Open(t TestingT, driverName, dataSourceName string, opts ...Option) *bj_power_wms.Client { + o := newOptions(opts) + c, err := bj_power_wms.Open(driverName, dataSourceName, o.opts...) + if err != nil { + t.Error(err) + t.FailNow() + } + migrateSchema(t, c, o) + return c +} + +// NewClient calls bj_power_wms.NewClient and auto-run migration. +func NewClient(t TestingT, opts ...Option) *bj_power_wms.Client { + o := newOptions(opts) + c := bj_power_wms.NewClient(o.opts...) + migrateSchema(t, c, o) + return c +} +func migrateSchema(t TestingT, c *bj_power_wms.Client, o *options) { + tables, err := schema.CopyTables(migrate.Tables) + if err != nil { + t.Error(err) + t.FailNow() + } + if err := migrate.Create(context.Background(), c.Schema, tables, o.migrateOpts...); err != nil { + t.Error(err) + t.FailNow() + } +} diff --git a/bj_power_wms/eventlog/eventlog.go b/bj_power_wms/eventlog/eventlog.go new file mode 100644 index 0000000..8c1bf11 --- /dev/null +++ b/bj_power_wms/eventlog/eventlog.go @@ -0,0 +1,111 @@ +// Code generated by ent, DO NOT EDIT. + +package eventlog + +import ( + "entgo.io/ent/dialect/sql" +) + +const ( + // Label holds the string label denoting the eventlog type in the database. + Label = "event_log" + // FieldID holds the string denoting the id field in the database. + FieldID = "id" + // FieldEventType holds the string denoting the event_type field in the database. + FieldEventType = "event_type" + // FieldOperator holds the string denoting the operator field in the database. + FieldOperator = "operator" + // FieldEntityType holds the string denoting the entity_type field in the database. + FieldEntityType = "entity_type" + // FieldEntityID holds the string denoting the entity_id field in the database. + FieldEntityID = "entity_id" + // FieldDescription holds the string denoting the description field in the database. + FieldDescription = "description" + // FieldPayload holds the string denoting the payload field in the database. + FieldPayload = "payload" + // FieldCreatedAt holds the string denoting the created_at field in the database. + FieldCreatedAt = "created_at" + // Table holds the table name of the eventlog in the database. + Table = "event_log" +) + +// Columns holds all SQL columns for eventlog fields. +var Columns = []string{ + FieldID, + FieldEventType, + FieldOperator, + FieldEntityType, + FieldEntityID, + FieldDescription, + FieldPayload, + FieldCreatedAt, +} + +// ValidColumn reports if the column name is valid (part of the table columns). +func ValidColumn(column string) bool { + for i := range Columns { + if column == Columns[i] { + return true + } + } + return false +} + +var ( + // EventTypeValidator is a validator for the "event_type" field. It is called by the builders before save. + EventTypeValidator func(string) error + // DefaultOperator holds the default value on creation for the "operator" field. + DefaultOperator string + // OperatorValidator is a validator for the "operator" field. It is called by the builders before save. + OperatorValidator func(string) error + // DefaultEntityType holds the default value on creation for the "entity_type" field. + DefaultEntityType string + // EntityTypeValidator is a validator for the "entity_type" field. It is called by the builders before save. + EntityTypeValidator func(string) error + // DefaultEntityID holds the default value on creation for the "entity_id" field. + DefaultEntityID string + // EntityIDValidator is a validator for the "entity_id" field. It is called by the builders before save. + EntityIDValidator func(string) error + // DefaultDescription holds the default value on creation for the "description" field. + DefaultDescription string + // DefaultCreatedAt holds the default value on creation for the "created_at" field. + DefaultCreatedAt func() int64 +) + +// OrderOption defines the ordering options for the EventLog queries. +type OrderOption func(*sql.Selector) + +// ByID orders the results by the id field. +func ByID(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldID, opts...).ToFunc() +} + +// ByEventType orders the results by the event_type field. +func ByEventType(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldEventType, opts...).ToFunc() +} + +// ByOperator orders the results by the operator field. +func ByOperator(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldOperator, opts...).ToFunc() +} + +// ByEntityType orders the results by the entity_type field. +func ByEntityType(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldEntityType, opts...).ToFunc() +} + +// ByEntityID orders the results by the entity_id field. +func ByEntityID(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldEntityID, opts...).ToFunc() +} + +// ByDescription orders the results by the description field. +func ByDescription(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldDescription, opts...).ToFunc() +} + +// ByCreatedAt orders the results by the created_at field. +func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption { + return sql.OrderByField(FieldCreatedAt, opts...).ToFunc() +} diff --git a/bj_power_wms/eventlog/where.go b/bj_power_wms/eventlog/where.go new file mode 100644 index 0000000..202e57c --- /dev/null +++ b/bj_power_wms/eventlog/where.go @@ -0,0 +1,474 @@ +// Code generated by ent, DO NOT EDIT. + +package eventlog + +import ( + "bj_power_wms/predicate" + + "entgo.io/ent/dialect/sql" +) + +// ID filters vertices based on their ID field. +func ID(id int) predicate.EventLog { + return predicate.EventLog(sql.FieldEQ(FieldID, id)) +} + +// IDEQ applies the EQ predicate on the ID field. +func IDEQ(id int) predicate.EventLog { + return predicate.EventLog(sql.FieldEQ(FieldID, id)) +} + +// IDNEQ applies the NEQ predicate on the ID field. +func IDNEQ(id int) predicate.EventLog { + return predicate.EventLog(sql.FieldNEQ(FieldID, id)) +} + +// IDIn applies the In predicate on the ID field. +func IDIn(ids ...int) predicate.EventLog { + return predicate.EventLog(sql.FieldIn(FieldID, ids...)) +} + +// IDNotIn applies the NotIn predicate on the ID field. +func IDNotIn(ids ...int) predicate.EventLog { + return predicate.EventLog(sql.FieldNotIn(FieldID, ids...)) +} + +// IDGT applies the GT predicate on the ID field. +func IDGT(id int) predicate.EventLog { + return predicate.EventLog(sql.FieldGT(FieldID, id)) +} + +// IDGTE applies the GTE predicate on the ID field. +func IDGTE(id int) predicate.EventLog { + return predicate.EventLog(sql.FieldGTE(FieldID, id)) +} + +// IDLT applies the LT predicate on the ID field. +func IDLT(id int) predicate.EventLog { + return predicate.EventLog(sql.FieldLT(FieldID, id)) +} + +// IDLTE applies the LTE predicate on the ID field. +func IDLTE(id int) predicate.EventLog { + return predicate.EventLog(sql.FieldLTE(FieldID, id)) +} + +// EventType applies equality check predicate on the "event_type" field. It's identical to EventTypeEQ. +func EventType(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldEQ(FieldEventType, v)) +} + +// Operator applies equality check predicate on the "operator" field. It's identical to OperatorEQ. +func Operator(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldEQ(FieldOperator, v)) +} + +// EntityType applies equality check predicate on the "entity_type" field. It's identical to EntityTypeEQ. +func EntityType(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldEQ(FieldEntityType, v)) +} + +// EntityID applies equality check predicate on the "entity_id" field. It's identical to EntityIDEQ. +func EntityID(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldEQ(FieldEntityID, v)) +} + +// Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ. +func Description(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldEQ(FieldDescription, v)) +} + +// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ. +func CreatedAt(v int64) predicate.EventLog { + return predicate.EventLog(sql.FieldEQ(FieldCreatedAt, v)) +} + +// EventTypeEQ applies the EQ predicate on the "event_type" field. +func EventTypeEQ(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldEQ(FieldEventType, v)) +} + +// EventTypeNEQ applies the NEQ predicate on the "event_type" field. +func EventTypeNEQ(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldNEQ(FieldEventType, v)) +} + +// EventTypeIn applies the In predicate on the "event_type" field. +func EventTypeIn(vs ...string) predicate.EventLog { + return predicate.EventLog(sql.FieldIn(FieldEventType, vs...)) +} + +// EventTypeNotIn applies the NotIn predicate on the "event_type" field. +func EventTypeNotIn(vs ...string) predicate.EventLog { + return predicate.EventLog(sql.FieldNotIn(FieldEventType, vs...)) +} + +// EventTypeGT applies the GT predicate on the "event_type" field. +func EventTypeGT(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldGT(FieldEventType, v)) +} + +// EventTypeGTE applies the GTE predicate on the "event_type" field. +func EventTypeGTE(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldGTE(FieldEventType, v)) +} + +// EventTypeLT applies the LT predicate on the "event_type" field. +func EventTypeLT(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldLT(FieldEventType, v)) +} + +// EventTypeLTE applies the LTE predicate on the "event_type" field. +func EventTypeLTE(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldLTE(FieldEventType, v)) +} + +// EventTypeContains applies the Contains predicate on the "event_type" field. +func EventTypeContains(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldContains(FieldEventType, v)) +} + +// EventTypeHasPrefix applies the HasPrefix predicate on the "event_type" field. +func EventTypeHasPrefix(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldHasPrefix(FieldEventType, v)) +} + +// EventTypeHasSuffix applies the HasSuffix predicate on the "event_type" field. +func EventTypeHasSuffix(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldHasSuffix(FieldEventType, v)) +} + +// EventTypeEqualFold applies the EqualFold predicate on the "event_type" field. +func EventTypeEqualFold(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldEqualFold(FieldEventType, v)) +} + +// EventTypeContainsFold applies the ContainsFold predicate on the "event_type" field. +func EventTypeContainsFold(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldContainsFold(FieldEventType, v)) +} + +// OperatorEQ applies the EQ predicate on the "operator" field. +func OperatorEQ(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldEQ(FieldOperator, v)) +} + +// OperatorNEQ applies the NEQ predicate on the "operator" field. +func OperatorNEQ(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldNEQ(FieldOperator, v)) +} + +// OperatorIn applies the In predicate on the "operator" field. +func OperatorIn(vs ...string) predicate.EventLog { + return predicate.EventLog(sql.FieldIn(FieldOperator, vs...)) +} + +// OperatorNotIn applies the NotIn predicate on the "operator" field. +func OperatorNotIn(vs ...string) predicate.EventLog { + return predicate.EventLog(sql.FieldNotIn(FieldOperator, vs...)) +} + +// OperatorGT applies the GT predicate on the "operator" field. +func OperatorGT(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldGT(FieldOperator, v)) +} + +// OperatorGTE applies the GTE predicate on the "operator" field. +func OperatorGTE(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldGTE(FieldOperator, v)) +} + +// OperatorLT applies the LT predicate on the "operator" field. +func OperatorLT(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldLT(FieldOperator, v)) +} + +// OperatorLTE applies the LTE predicate on the "operator" field. +func OperatorLTE(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldLTE(FieldOperator, v)) +} + +// OperatorContains applies the Contains predicate on the "operator" field. +func OperatorContains(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldContains(FieldOperator, v)) +} + +// OperatorHasPrefix applies the HasPrefix predicate on the "operator" field. +func OperatorHasPrefix(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldHasPrefix(FieldOperator, v)) +} + +// OperatorHasSuffix applies the HasSuffix predicate on the "operator" field. +func OperatorHasSuffix(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldHasSuffix(FieldOperator, v)) +} + +// OperatorEqualFold applies the EqualFold predicate on the "operator" field. +func OperatorEqualFold(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldEqualFold(FieldOperator, v)) +} + +// OperatorContainsFold applies the ContainsFold predicate on the "operator" field. +func OperatorContainsFold(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldContainsFold(FieldOperator, v)) +} + +// EntityTypeEQ applies the EQ predicate on the "entity_type" field. +func EntityTypeEQ(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldEQ(FieldEntityType, v)) +} + +// EntityTypeNEQ applies the NEQ predicate on the "entity_type" field. +func EntityTypeNEQ(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldNEQ(FieldEntityType, v)) +} + +// EntityTypeIn applies the In predicate on the "entity_type" field. +func EntityTypeIn(vs ...string) predicate.EventLog { + return predicate.EventLog(sql.FieldIn(FieldEntityType, vs...)) +} + +// EntityTypeNotIn applies the NotIn predicate on the "entity_type" field. +func EntityTypeNotIn(vs ...string) predicate.EventLog { + return predicate.EventLog(sql.FieldNotIn(FieldEntityType, vs...)) +} + +// EntityTypeGT applies the GT predicate on the "entity_type" field. +func EntityTypeGT(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldGT(FieldEntityType, v)) +} + +// EntityTypeGTE applies the GTE predicate on the "entity_type" field. +func EntityTypeGTE(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldGTE(FieldEntityType, v)) +} + +// EntityTypeLT applies the LT predicate on the "entity_type" field. +func EntityTypeLT(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldLT(FieldEntityType, v)) +} + +// EntityTypeLTE applies the LTE predicate on the "entity_type" field. +func EntityTypeLTE(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldLTE(FieldEntityType, v)) +} + +// EntityTypeContains applies the Contains predicate on the "entity_type" field. +func EntityTypeContains(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldContains(FieldEntityType, v)) +} + +// EntityTypeHasPrefix applies the HasPrefix predicate on the "entity_type" field. +func EntityTypeHasPrefix(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldHasPrefix(FieldEntityType, v)) +} + +// EntityTypeHasSuffix applies the HasSuffix predicate on the "entity_type" field. +func EntityTypeHasSuffix(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldHasSuffix(FieldEntityType, v)) +} + +// EntityTypeEqualFold applies the EqualFold predicate on the "entity_type" field. +func EntityTypeEqualFold(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldEqualFold(FieldEntityType, v)) +} + +// EntityTypeContainsFold applies the ContainsFold predicate on the "entity_type" field. +func EntityTypeContainsFold(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldContainsFold(FieldEntityType, v)) +} + +// EntityIDEQ applies the EQ predicate on the "entity_id" field. +func EntityIDEQ(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldEQ(FieldEntityID, v)) +} + +// EntityIDNEQ applies the NEQ predicate on the "entity_id" field. +func EntityIDNEQ(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldNEQ(FieldEntityID, v)) +} + +// EntityIDIn applies the In predicate on the "entity_id" field. +func EntityIDIn(vs ...string) predicate.EventLog { + return predicate.EventLog(sql.FieldIn(FieldEntityID, vs...)) +} + +// EntityIDNotIn applies the NotIn predicate on the "entity_id" field. +func EntityIDNotIn(vs ...string) predicate.EventLog { + return predicate.EventLog(sql.FieldNotIn(FieldEntityID, vs...)) +} + +// EntityIDGT applies the GT predicate on the "entity_id" field. +func EntityIDGT(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldGT(FieldEntityID, v)) +} + +// EntityIDGTE applies the GTE predicate on the "entity_id" field. +func EntityIDGTE(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldGTE(FieldEntityID, v)) +} + +// EntityIDLT applies the LT predicate on the "entity_id" field. +func EntityIDLT(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldLT(FieldEntityID, v)) +} + +// EntityIDLTE applies the LTE predicate on the "entity_id" field. +func EntityIDLTE(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldLTE(FieldEntityID, v)) +} + +// EntityIDContains applies the Contains predicate on the "entity_id" field. +func EntityIDContains(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldContains(FieldEntityID, v)) +} + +// EntityIDHasPrefix applies the HasPrefix predicate on the "entity_id" field. +func EntityIDHasPrefix(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldHasPrefix(FieldEntityID, v)) +} + +// EntityIDHasSuffix applies the HasSuffix predicate on the "entity_id" field. +func EntityIDHasSuffix(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldHasSuffix(FieldEntityID, v)) +} + +// EntityIDEqualFold applies the EqualFold predicate on the "entity_id" field. +func EntityIDEqualFold(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldEqualFold(FieldEntityID, v)) +} + +// EntityIDContainsFold applies the ContainsFold predicate on the "entity_id" field. +func EntityIDContainsFold(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldContainsFold(FieldEntityID, v)) +} + +// DescriptionEQ applies the EQ predicate on the "description" field. +func DescriptionEQ(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldEQ(FieldDescription, v)) +} + +// DescriptionNEQ applies the NEQ predicate on the "description" field. +func DescriptionNEQ(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldNEQ(FieldDescription, v)) +} + +// DescriptionIn applies the In predicate on the "description" field. +func DescriptionIn(vs ...string) predicate.EventLog { + return predicate.EventLog(sql.FieldIn(FieldDescription, vs...)) +} + +// DescriptionNotIn applies the NotIn predicate on the "description" field. +func DescriptionNotIn(vs ...string) predicate.EventLog { + return predicate.EventLog(sql.FieldNotIn(FieldDescription, vs...)) +} + +// DescriptionGT applies the GT predicate on the "description" field. +func DescriptionGT(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldGT(FieldDescription, v)) +} + +// DescriptionGTE applies the GTE predicate on the "description" field. +func DescriptionGTE(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldGTE(FieldDescription, v)) +} + +// DescriptionLT applies the LT predicate on the "description" field. +func DescriptionLT(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldLT(FieldDescription, v)) +} + +// DescriptionLTE applies the LTE predicate on the "description" field. +func DescriptionLTE(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldLTE(FieldDescription, v)) +} + +// DescriptionContains applies the Contains predicate on the "description" field. +func DescriptionContains(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldContains(FieldDescription, v)) +} + +// DescriptionHasPrefix applies the HasPrefix predicate on the "description" field. +func DescriptionHasPrefix(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldHasPrefix(FieldDescription, v)) +} + +// DescriptionHasSuffix applies the HasSuffix predicate on the "description" field. +func DescriptionHasSuffix(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldHasSuffix(FieldDescription, v)) +} + +// DescriptionEqualFold applies the EqualFold predicate on the "description" field. +func DescriptionEqualFold(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldEqualFold(FieldDescription, v)) +} + +// DescriptionContainsFold applies the ContainsFold predicate on the "description" field. +func DescriptionContainsFold(v string) predicate.EventLog { + return predicate.EventLog(sql.FieldContainsFold(FieldDescription, v)) +} + +// PayloadIsNil applies the IsNil predicate on the "payload" field. +func PayloadIsNil() predicate.EventLog { + return predicate.EventLog(sql.FieldIsNull(FieldPayload)) +} + +// PayloadNotNil applies the NotNil predicate on the "payload" field. +func PayloadNotNil() predicate.EventLog { + return predicate.EventLog(sql.FieldNotNull(FieldPayload)) +} + +// CreatedAtEQ applies the EQ predicate on the "created_at" field. +func CreatedAtEQ(v int64) predicate.EventLog { + return predicate.EventLog(sql.FieldEQ(FieldCreatedAt, v)) +} + +// CreatedAtNEQ applies the NEQ predicate on the "created_at" field. +func CreatedAtNEQ(v int64) predicate.EventLog { + return predicate.EventLog(sql.FieldNEQ(FieldCreatedAt, v)) +} + +// CreatedAtIn applies the In predicate on the "created_at" field. +func CreatedAtIn(vs ...int64) predicate.EventLog { + return predicate.EventLog(sql.FieldIn(FieldCreatedAt, vs...)) +} + +// CreatedAtNotIn applies the NotIn predicate on the "created_at" field. +func CreatedAtNotIn(vs ...int64) predicate.EventLog { + return predicate.EventLog(sql.FieldNotIn(FieldCreatedAt, vs...)) +} + +// CreatedAtGT applies the GT predicate on the "created_at" field. +func CreatedAtGT(v int64) predicate.EventLog { + return predicate.EventLog(sql.FieldGT(FieldCreatedAt, v)) +} + +// CreatedAtGTE applies the GTE predicate on the "created_at" field. +func CreatedAtGTE(v int64) predicate.EventLog { + return predicate.EventLog(sql.FieldGTE(FieldCreatedAt, v)) +} + +// CreatedAtLT applies the LT predicate on the "created_at" field. +func CreatedAtLT(v int64) predicate.EventLog { + return predicate.EventLog(sql.FieldLT(FieldCreatedAt, v)) +} + +// CreatedAtLTE applies the LTE predicate on the "created_at" field. +func CreatedAtLTE(v int64) predicate.EventLog { + return predicate.EventLog(sql.FieldLTE(FieldCreatedAt, v)) +} + +// And groups predicates with the AND operator between them. +func And(predicates ...predicate.EventLog) predicate.EventLog { + return predicate.EventLog(sql.AndPredicates(predicates...)) +} + +// Or groups predicates with the OR operator between them. +func Or(predicates ...predicate.EventLog) predicate.EventLog { + return predicate.EventLog(sql.OrPredicates(predicates...)) +} + +// Not applies the not operator on the given predicate. +func Not(p predicate.EventLog) predicate.EventLog { + return predicate.EventLog(sql.NotPredicates(p)) +} diff --git a/bj_power_wms/frontend/src/pages/BaseData.vue b/bj_power_wms/frontend/src/pages/BaseData.vue index ca56788..7faf7c3 100644 --- a/bj_power_wms/frontend/src/pages/BaseData.vue +++ b/bj_power_wms/frontend/src/pages/BaseData.vue @@ -917,8 +917,8 @@ async function onMaterialFile(e) { @@ -967,8 +967,13 @@ async function onMaterialFile(e) { - - + + diff --git a/bj_power_wms/frontend/src/pages/Inbound.vue b/bj_power_wms/frontend/src/pages/Inbound.vue index 08ac24c..296963e 100644 --- a/bj_power_wms/frontend/src/pages/Inbound.vue +++ b/bj_power_wms/frontend/src/pages/Inbound.vue @@ -91,7 +91,7 @@ const batchRef = ref() const submitting1 = ref(false) const lastInboundNo = ref('') const form1 = reactive({ - materialCode: '', batchNo: '', quantity: 1, + inboundNo: '', materialCode: '', batchNo: '', quantity: 1, zoneCode: '', shelfNo: '', layerNo: '', positionNo: '', ownershipType: '', ownershipNo: '', productionDate: '', supplier: '', remark: '', inspectionNo: '' @@ -124,6 +124,7 @@ async function submitBatch() { submitting1.value = true try { const data = await request.post('/inbound/create', { + inboundNo: form1.inboundNo.trim(), inboundType: 'purchase', materialCode: form1.materialCode, batchNo: form1.batchNo.trim(), @@ -157,7 +158,7 @@ async function submitBatch() { const snInput = ref('') const submitting2 = ref(false) const snList = ref([]) -const form2 = reactive({ materialCode: '', zoneCode: '', shelfNo: '', layerNo: '', positionNo: '', ownershipType: '', ownershipNo: '', remark: '', inspectionNo: '' }) +const form2 = reactive({ inboundNo: '', materialCode: '', zoneCode: '', shelfNo: '', layerNo: '', positionNo: '', ownershipType: '', ownershipNo: '', remark: '', inspectionNo: '' }) // 与 Tab1/Tab3 对齐:走 el-form 校验,必填项既爆红又弹窗 const form2Ref = ref(null) const rules2 = { @@ -205,6 +206,7 @@ async function submitSn() { submitting2.value = true try { const data = await request.post('/inbound/create', { + inboundNo: form2.inboundNo.trim(), inboundType: 'purchase', materialCode: form2.materialCode, zoneCode: form2.zoneCode, @@ -275,6 +277,7 @@ async function importExcel(mode, which) { const otherRef = ref() const submitting3 = ref(false) const form3 = reactive({ + inboundNo: '', materialCode: '', batchNo: '', quantity: 1, zoneCode: '', shelfNo: '', layerNo: '', positionNo: '', ownershipType: '', ownershipNo: '', @@ -322,6 +325,7 @@ async function submitOther() { submitting3.value = true try { const data = await request.post('/inbound/create', { + inboundNo: form3.inboundNo.trim(), inboundType: 'other', materialCode: form3.materialCode, batchNo: form3.batchNo.trim(), @@ -352,7 +356,7 @@ async function submitOther() { /* ===================== Tab4 入库记录(统一主表 + 抽屉明细,不分页内嵌子表) ===================== */ // 查询条件 -const filters = reactive({ inboundNo: '', materialCode: '', manageMode: '', materialName: '', voided: '' }) +const filters = reactive({ inboundNo: '', materialCode: '', manageMode: '', materialName: '', voided: '', inspectionNo: '' }) const dateRange = ref([]) // [开始日期, 结束日期] YYYY-MM-DD const loadingRec = ref(false) const list = ref([]) @@ -370,6 +374,7 @@ async function loadRecords() { manageMode: filters.manageMode === 'other' ? '' : filters.manageMode, inboundType: filters.manageMode === 'other' ? 'other' : '', materialName: filters.materialName.trim(), + inspectionNo: filters.inspectionNo.trim(), voided: filters.voided, startDate: dateRange.value?.[0] || '', endDate: dateRange.value?.[1] || '', @@ -393,6 +398,7 @@ function resetFilters() { filters.materialCode = '' filters.manageMode = '' filters.materialName = '' + filters.inspectionNo = '' filters.voided = '' dateRange.value = [] search() @@ -437,6 +443,7 @@ async function exportCsv() { manageMode: filters.manageMode === 'other' ? '' : filters.manageMode, inboundType: filters.manageMode === 'other' ? 'other' : '', materialName: filters.materialName.trim(), + inspectionNo: filters.inspectionNo.trim(), voided: filters.voided, startDate: dateRange.value?.[0] || '', endDate: dateRange.value?.[1] || '' @@ -447,10 +454,10 @@ async function exportCsv() { } // 入库单明细:点击"明细"用右侧抽屉懒加载 + 分页(不在列表内嵌子表,避免表格套表格) -const detailDrawer = reactive({ visible: false, inboundNo: '', list: [], total: 0, page: 1, size: 50, loading: false, loaded: false }) +const detailDrawer = reactive({ visible: false, inboundNo: '', list: [], total: 0, page: 1, size: 20, loading: false, loaded: false }) async function openDetail(row) { const no = row.inboundNo - Object.assign(detailDrawer, { visible: true, inboundNo: no, list: [], total: 0, page: 1, size: 50, loaded: false }) + Object.assign(detailDrawer, { visible: true, inboundNo: no, list: [], total: 0, page: 1, size: 20, loaded: false }) await fetchDetailPage() } async function fetchDetailPage() { @@ -657,6 +664,9 @@ onActivated(() => { placeholder="请填写归属编号" clearable style="width:260px" /> + + + @@ -747,6 +757,9 @@ onActivated(() => { placeholder="请填写归属编号" clearable style="width:260px" /> + + + @@ -855,6 +868,9 @@ onActivated(() => { + + + @@ -898,6 +914,9 @@ onActivated(() => { + + + diff --git a/bj_power_wms/frontend/src/pages/Inspection.vue b/bj_power_wms/frontend/src/pages/Inspection.vue index 7e077b1..7ad74d1 100644 --- a/bj_power_wms/frontend/src/pages/Inspection.vue +++ b/bj_power_wms/frontend/src/pages/Inspection.vue @@ -211,11 +211,7 @@ async function submitInspection() { manufacturer.value = '' await loadRecords() if (allPass && passedNo) { - try { - await ElMessageBox.confirm(`检验合格,是否携检测单号 ${passedNo} 前往入库?`, '前往入库', - { type: 'success', confirmButtonText: '去入库', cancelButtonText: '留在本页' }) - router.push({ path: '/inbound', query: { inspectionNo: passedNo } }) - } catch { /* 用户选择留在本页 */ } + ElMessage.success(`检验合格,检测单号 ${passedNo}`) } } finally { submitting.value = false @@ -228,7 +224,44 @@ const pendingLoading = ref(false) const pendingRows = ref([]) const pendingTotal = ref(0) const pendingPage = reactive({ current: 1, size: 20 }) -const pendingSelected = ref([]) // 选中的明细 targetId 集合(跨行) + +// 抽屉:右侧滑出,分页加载该入库单+物料的未检明细(替代原 el-table type="expand" 嵌套子表) +const detailDrawer = reactive({ + visible: false, + row: null, // 主行快照(inboundNo/materialCode/ownership 等,整单送检/带入时用) + list: [], // 当前页明细 + total: 0, // 明细总数 + page: 1, + size: 20, + loading: false, + selected: [] // 抽屉内勾选的 targetId 集合 +}) +const detailDrawerSelectedIds = computed(() => new Set(detailDrawer.selected)) + +function openDetailDrawer(row) { + Object.assign(detailDrawer, { + visible: true, row: { ...row }, + list: [], total: 0, page: 1, size: 20, loading: false, selected: [] + }) + fetchDetailDrawerPage() +} +async function fetchDetailDrawerPage() { + const st = detailDrawer + st.loading = true + try { + const d = await request.get('/inspection/pending/details', { + params: { inboundNo: st.row.inboundNo, materialCode: st.row.materialCode, page: st.page, pageSize: st.size } + }) + st.list = d?.list || [] + st.total = d?.total || 0 + } finally { + st.loading = false + } +} +function changeDetailDrawerPage(p) { + detailDrawer.page = p + fetchDetailDrawerPage() +} const inboundTypeLabel = (t) => { const m = { purchase: '采购入库', semi: '半成品入库', finished: '成品入库', return: '退库入库', other: '其他入库' } @@ -259,28 +292,37 @@ function searchPending() { pendingPage.current = 1 loadPending() } -// 整单送检 / 单条送检 / 选中送检 -function sendWhole(row) { - sendToEntry(row.details || [], row) + +// 整单送检:直接按 inboundNo+materialCode 拉全量未检明细(pageSize=99999,一次入库单 3000 条可接受) +async function sendWhole(row) { + const d = await request.get('/inspection/pending/details', { + params: { inboundNo: row.inboundNo, materialCode: row.materialCode, page: 1, pageSize: 99999 } + }) + const details = d?.list || [] + sendToEntry(details, row) } -function sendOne(row, detail) { - sendToEntry([detail], row) +function sendOneFromDrawer(detail) { + sendToEntry([detail], detailDrawer.row) } -function sendSelected() { - if (!pendingSelected.value.length) { +function sendSelectedFromDrawer() { + if (!detailDrawer.selected.length) { ElMessage.warning('请先勾选要送检的批次/SN') return } - const details = [] - for (const row of pendingRows.value) { - for (const d of row.details || []) { - if (pendingSelected.value.includes(d.targetId)) details.push(d) - } + if (detailDrawer.selected.length > 100) { + ElMessageBox.confirm('单次送检上限 100 条,请分批送检。', '提示', { type: 'warning', confirmButtonText: '知道了', showCancelButton: false }) + return } - // 归属取首个命中行的入库单 - const firstRow = pendingRows.value.find((r) => (r.details || []).some((d) => pendingSelected.value.includes(d.targetId))) - sendToEntry(details, firstRow) - pendingSelected.value = [] + // 合并已加载页里的选中项 + 翻页选中的项(用 total details 拉全量过滤,避免跨页丢选) + // 但跨页选中无法从当前抽屉 list 覆盖,用全量过滤 targetId + const ids = new Set(detailDrawer.selected) + request.get('/inspection/pending/details', { + params: { inboundNo: detailDrawer.row.inboundNo, materialCode: detailDrawer.row.materialCode, page: 1, pageSize: 99999 } + }).then((d) => { + const details = (d?.list || []).filter((x) => ids.has(x.targetId)) + sendToEntry(details, detailDrawer.row) + detailDrawer.selected = [] + }) } /* ===================== 不合格处置 ===================== */ @@ -590,38 +632,11 @@ onMounted(() => { 查询 - 送检选中 ({{ pendingSelected.length }}) - - - - - + + @@ -633,8 +648,8 @@ onMounted(() => { - - + +