feat(mes): 添加定时同步可生产数量到WMS及BOM项相关标准字段
- 在main.go中添加定时任务每10分钟同步可生产数量到WMS系统 - 为BomItem实体添加relatedStandard字段及相关CRUD方法 - 为InspectionRecord实体添加reportNo、materialCode、materialName等字段 - 更新ent schema确保新字段的验证和默认值设置 - 添加必要的数据库迁移和字段映射逻辑
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package produciblesnapshot
|
||||
|
||||
import (
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the produciblesnapshot type in the database.
|
||||
Label = "producible_snapshot"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldProductCode holds the string denoting the product_code field in the database.
|
||||
FieldProductCode = "product_code"
|
||||
// FieldProductName holds the string denoting the product_name field in the database.
|
||||
FieldProductName = "product_name"
|
||||
// FieldProducibleQty holds the string denoting the producible_qty field in the database.
|
||||
FieldProducibleQty = "producible_qty"
|
||||
// FieldShortText holds the string denoting the short_text field in the database.
|
||||
FieldShortText = "short_text"
|
||||
// FieldComputedAt holds the string denoting the computed_at field in the database.
|
||||
FieldComputedAt = "computed_at"
|
||||
// FieldSyncedAt holds the string denoting the synced_at field in the database.
|
||||
FieldSyncedAt = "synced_at"
|
||||
// Table holds the table name of the produciblesnapshot in the database.
|
||||
Table = "producible_snapshots"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for produciblesnapshot fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldProductCode,
|
||||
FieldProductName,
|
||||
FieldProducibleQty,
|
||||
FieldShortText,
|
||||
FieldComputedAt,
|
||||
FieldSyncedAt,
|
||||
}
|
||||
|
||||
// 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 (
|
||||
// DefaultProducibleQty holds the default value on creation for the "producible_qty" field.
|
||||
DefaultProducibleQty int
|
||||
// DefaultComputedAt holds the default value on creation for the "computed_at" field.
|
||||
DefaultComputedAt int64
|
||||
// DefaultSyncedAt holds the default value on creation for the "synced_at" field.
|
||||
DefaultSyncedAt func() int64
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the ProducibleSnapshot 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()
|
||||
}
|
||||
|
||||
// ByProductCode orders the results by the product_code field.
|
||||
func ByProductCode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldProductCode, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByProductName orders the results by the product_name field.
|
||||
func ByProductName(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldProductName, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByProducibleQty orders the results by the producible_qty field.
|
||||
func ByProducibleQty(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldProducibleQty, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByShortText orders the results by the short_text field.
|
||||
func ByShortText(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldShortText, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByComputedAt orders the results by the computed_at field.
|
||||
func ByComputedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldComputedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySyncedAt orders the results by the synced_at field.
|
||||
func BySyncedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSyncedAt, opts...).ToFunc()
|
||||
}
|
||||
@@ -0,0 +1,434 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package produciblesnapshot
|
||||
|
||||
import (
|
||||
"bj_power_wms/ent/predicate"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
func ID(id int) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDEQ applies the EQ predicate on the ID field.
|
||||
func IDEQ(id int) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDNEQ applies the NEQ predicate on the ID field.
|
||||
func IDNEQ(id int) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldNEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...int) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...int) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldNotIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDGT applies the GT predicate on the ID field.
|
||||
func IDGT(id int) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldGT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDGTE applies the GTE predicate on the ID field.
|
||||
func IDGTE(id int) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldGTE(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLT applies the LT predicate on the ID field.
|
||||
func IDLT(id int) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldLT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLTE applies the LTE predicate on the ID field.
|
||||
func IDLTE(id int) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldLTE(FieldID, id))
|
||||
}
|
||||
|
||||
// ProductCode applies equality check predicate on the "product_code" field. It's identical to ProductCodeEQ.
|
||||
func ProductCode(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldEQ(FieldProductCode, v))
|
||||
}
|
||||
|
||||
// ProductName applies equality check predicate on the "product_name" field. It's identical to ProductNameEQ.
|
||||
func ProductName(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldEQ(FieldProductName, v))
|
||||
}
|
||||
|
||||
// ProducibleQty applies equality check predicate on the "producible_qty" field. It's identical to ProducibleQtyEQ.
|
||||
func ProducibleQty(v int) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldEQ(FieldProducibleQty, v))
|
||||
}
|
||||
|
||||
// ShortText applies equality check predicate on the "short_text" field. It's identical to ShortTextEQ.
|
||||
func ShortText(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldEQ(FieldShortText, v))
|
||||
}
|
||||
|
||||
// ComputedAt applies equality check predicate on the "computed_at" field. It's identical to ComputedAtEQ.
|
||||
func ComputedAt(v int64) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldEQ(FieldComputedAt, v))
|
||||
}
|
||||
|
||||
// SyncedAt applies equality check predicate on the "synced_at" field. It's identical to SyncedAtEQ.
|
||||
func SyncedAt(v int64) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldEQ(FieldSyncedAt, v))
|
||||
}
|
||||
|
||||
// ProductCodeEQ applies the EQ predicate on the "product_code" field.
|
||||
func ProductCodeEQ(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldEQ(FieldProductCode, v))
|
||||
}
|
||||
|
||||
// ProductCodeNEQ applies the NEQ predicate on the "product_code" field.
|
||||
func ProductCodeNEQ(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldNEQ(FieldProductCode, v))
|
||||
}
|
||||
|
||||
// ProductCodeIn applies the In predicate on the "product_code" field.
|
||||
func ProductCodeIn(vs ...string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldIn(FieldProductCode, vs...))
|
||||
}
|
||||
|
||||
// ProductCodeNotIn applies the NotIn predicate on the "product_code" field.
|
||||
func ProductCodeNotIn(vs ...string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldNotIn(FieldProductCode, vs...))
|
||||
}
|
||||
|
||||
// ProductCodeGT applies the GT predicate on the "product_code" field.
|
||||
func ProductCodeGT(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldGT(FieldProductCode, v))
|
||||
}
|
||||
|
||||
// ProductCodeGTE applies the GTE predicate on the "product_code" field.
|
||||
func ProductCodeGTE(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldGTE(FieldProductCode, v))
|
||||
}
|
||||
|
||||
// ProductCodeLT applies the LT predicate on the "product_code" field.
|
||||
func ProductCodeLT(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldLT(FieldProductCode, v))
|
||||
}
|
||||
|
||||
// ProductCodeLTE applies the LTE predicate on the "product_code" field.
|
||||
func ProductCodeLTE(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldLTE(FieldProductCode, v))
|
||||
}
|
||||
|
||||
// ProductCodeContains applies the Contains predicate on the "product_code" field.
|
||||
func ProductCodeContains(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldContains(FieldProductCode, v))
|
||||
}
|
||||
|
||||
// ProductCodeHasPrefix applies the HasPrefix predicate on the "product_code" field.
|
||||
func ProductCodeHasPrefix(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldHasPrefix(FieldProductCode, v))
|
||||
}
|
||||
|
||||
// ProductCodeHasSuffix applies the HasSuffix predicate on the "product_code" field.
|
||||
func ProductCodeHasSuffix(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldHasSuffix(FieldProductCode, v))
|
||||
}
|
||||
|
||||
// ProductCodeEqualFold applies the EqualFold predicate on the "product_code" field.
|
||||
func ProductCodeEqualFold(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldEqualFold(FieldProductCode, v))
|
||||
}
|
||||
|
||||
// ProductCodeContainsFold applies the ContainsFold predicate on the "product_code" field.
|
||||
func ProductCodeContainsFold(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldContainsFold(FieldProductCode, v))
|
||||
}
|
||||
|
||||
// ProductNameEQ applies the EQ predicate on the "product_name" field.
|
||||
func ProductNameEQ(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldEQ(FieldProductName, v))
|
||||
}
|
||||
|
||||
// ProductNameNEQ applies the NEQ predicate on the "product_name" field.
|
||||
func ProductNameNEQ(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldNEQ(FieldProductName, v))
|
||||
}
|
||||
|
||||
// ProductNameIn applies the In predicate on the "product_name" field.
|
||||
func ProductNameIn(vs ...string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldIn(FieldProductName, vs...))
|
||||
}
|
||||
|
||||
// ProductNameNotIn applies the NotIn predicate on the "product_name" field.
|
||||
func ProductNameNotIn(vs ...string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldNotIn(FieldProductName, vs...))
|
||||
}
|
||||
|
||||
// ProductNameGT applies the GT predicate on the "product_name" field.
|
||||
func ProductNameGT(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldGT(FieldProductName, v))
|
||||
}
|
||||
|
||||
// ProductNameGTE applies the GTE predicate on the "product_name" field.
|
||||
func ProductNameGTE(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldGTE(FieldProductName, v))
|
||||
}
|
||||
|
||||
// ProductNameLT applies the LT predicate on the "product_name" field.
|
||||
func ProductNameLT(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldLT(FieldProductName, v))
|
||||
}
|
||||
|
||||
// ProductNameLTE applies the LTE predicate on the "product_name" field.
|
||||
func ProductNameLTE(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldLTE(FieldProductName, v))
|
||||
}
|
||||
|
||||
// ProductNameContains applies the Contains predicate on the "product_name" field.
|
||||
func ProductNameContains(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldContains(FieldProductName, v))
|
||||
}
|
||||
|
||||
// ProductNameHasPrefix applies the HasPrefix predicate on the "product_name" field.
|
||||
func ProductNameHasPrefix(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldHasPrefix(FieldProductName, v))
|
||||
}
|
||||
|
||||
// ProductNameHasSuffix applies the HasSuffix predicate on the "product_name" field.
|
||||
func ProductNameHasSuffix(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldHasSuffix(FieldProductName, v))
|
||||
}
|
||||
|
||||
// ProductNameIsNil applies the IsNil predicate on the "product_name" field.
|
||||
func ProductNameIsNil() predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldIsNull(FieldProductName))
|
||||
}
|
||||
|
||||
// ProductNameNotNil applies the NotNil predicate on the "product_name" field.
|
||||
func ProductNameNotNil() predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldNotNull(FieldProductName))
|
||||
}
|
||||
|
||||
// ProductNameEqualFold applies the EqualFold predicate on the "product_name" field.
|
||||
func ProductNameEqualFold(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldEqualFold(FieldProductName, v))
|
||||
}
|
||||
|
||||
// ProductNameContainsFold applies the ContainsFold predicate on the "product_name" field.
|
||||
func ProductNameContainsFold(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldContainsFold(FieldProductName, v))
|
||||
}
|
||||
|
||||
// ProducibleQtyEQ applies the EQ predicate on the "producible_qty" field.
|
||||
func ProducibleQtyEQ(v int) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldEQ(FieldProducibleQty, v))
|
||||
}
|
||||
|
||||
// ProducibleQtyNEQ applies the NEQ predicate on the "producible_qty" field.
|
||||
func ProducibleQtyNEQ(v int) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldNEQ(FieldProducibleQty, v))
|
||||
}
|
||||
|
||||
// ProducibleQtyIn applies the In predicate on the "producible_qty" field.
|
||||
func ProducibleQtyIn(vs ...int) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldIn(FieldProducibleQty, vs...))
|
||||
}
|
||||
|
||||
// ProducibleQtyNotIn applies the NotIn predicate on the "producible_qty" field.
|
||||
func ProducibleQtyNotIn(vs ...int) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldNotIn(FieldProducibleQty, vs...))
|
||||
}
|
||||
|
||||
// ProducibleQtyGT applies the GT predicate on the "producible_qty" field.
|
||||
func ProducibleQtyGT(v int) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldGT(FieldProducibleQty, v))
|
||||
}
|
||||
|
||||
// ProducibleQtyGTE applies the GTE predicate on the "producible_qty" field.
|
||||
func ProducibleQtyGTE(v int) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldGTE(FieldProducibleQty, v))
|
||||
}
|
||||
|
||||
// ProducibleQtyLT applies the LT predicate on the "producible_qty" field.
|
||||
func ProducibleQtyLT(v int) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldLT(FieldProducibleQty, v))
|
||||
}
|
||||
|
||||
// ProducibleQtyLTE applies the LTE predicate on the "producible_qty" field.
|
||||
func ProducibleQtyLTE(v int) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldLTE(FieldProducibleQty, v))
|
||||
}
|
||||
|
||||
// ShortTextEQ applies the EQ predicate on the "short_text" field.
|
||||
func ShortTextEQ(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldEQ(FieldShortText, v))
|
||||
}
|
||||
|
||||
// ShortTextNEQ applies the NEQ predicate on the "short_text" field.
|
||||
func ShortTextNEQ(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldNEQ(FieldShortText, v))
|
||||
}
|
||||
|
||||
// ShortTextIn applies the In predicate on the "short_text" field.
|
||||
func ShortTextIn(vs ...string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldIn(FieldShortText, vs...))
|
||||
}
|
||||
|
||||
// ShortTextNotIn applies the NotIn predicate on the "short_text" field.
|
||||
func ShortTextNotIn(vs ...string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldNotIn(FieldShortText, vs...))
|
||||
}
|
||||
|
||||
// ShortTextGT applies the GT predicate on the "short_text" field.
|
||||
func ShortTextGT(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldGT(FieldShortText, v))
|
||||
}
|
||||
|
||||
// ShortTextGTE applies the GTE predicate on the "short_text" field.
|
||||
func ShortTextGTE(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldGTE(FieldShortText, v))
|
||||
}
|
||||
|
||||
// ShortTextLT applies the LT predicate on the "short_text" field.
|
||||
func ShortTextLT(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldLT(FieldShortText, v))
|
||||
}
|
||||
|
||||
// ShortTextLTE applies the LTE predicate on the "short_text" field.
|
||||
func ShortTextLTE(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldLTE(FieldShortText, v))
|
||||
}
|
||||
|
||||
// ShortTextContains applies the Contains predicate on the "short_text" field.
|
||||
func ShortTextContains(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldContains(FieldShortText, v))
|
||||
}
|
||||
|
||||
// ShortTextHasPrefix applies the HasPrefix predicate on the "short_text" field.
|
||||
func ShortTextHasPrefix(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldHasPrefix(FieldShortText, v))
|
||||
}
|
||||
|
||||
// ShortTextHasSuffix applies the HasSuffix predicate on the "short_text" field.
|
||||
func ShortTextHasSuffix(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldHasSuffix(FieldShortText, v))
|
||||
}
|
||||
|
||||
// ShortTextIsNil applies the IsNil predicate on the "short_text" field.
|
||||
func ShortTextIsNil() predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldIsNull(FieldShortText))
|
||||
}
|
||||
|
||||
// ShortTextNotNil applies the NotNil predicate on the "short_text" field.
|
||||
func ShortTextNotNil() predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldNotNull(FieldShortText))
|
||||
}
|
||||
|
||||
// ShortTextEqualFold applies the EqualFold predicate on the "short_text" field.
|
||||
func ShortTextEqualFold(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldEqualFold(FieldShortText, v))
|
||||
}
|
||||
|
||||
// ShortTextContainsFold applies the ContainsFold predicate on the "short_text" field.
|
||||
func ShortTextContainsFold(v string) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldContainsFold(FieldShortText, v))
|
||||
}
|
||||
|
||||
// ComputedAtEQ applies the EQ predicate on the "computed_at" field.
|
||||
func ComputedAtEQ(v int64) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldEQ(FieldComputedAt, v))
|
||||
}
|
||||
|
||||
// ComputedAtNEQ applies the NEQ predicate on the "computed_at" field.
|
||||
func ComputedAtNEQ(v int64) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldNEQ(FieldComputedAt, v))
|
||||
}
|
||||
|
||||
// ComputedAtIn applies the In predicate on the "computed_at" field.
|
||||
func ComputedAtIn(vs ...int64) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldIn(FieldComputedAt, vs...))
|
||||
}
|
||||
|
||||
// ComputedAtNotIn applies the NotIn predicate on the "computed_at" field.
|
||||
func ComputedAtNotIn(vs ...int64) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldNotIn(FieldComputedAt, vs...))
|
||||
}
|
||||
|
||||
// ComputedAtGT applies the GT predicate on the "computed_at" field.
|
||||
func ComputedAtGT(v int64) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldGT(FieldComputedAt, v))
|
||||
}
|
||||
|
||||
// ComputedAtGTE applies the GTE predicate on the "computed_at" field.
|
||||
func ComputedAtGTE(v int64) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldGTE(FieldComputedAt, v))
|
||||
}
|
||||
|
||||
// ComputedAtLT applies the LT predicate on the "computed_at" field.
|
||||
func ComputedAtLT(v int64) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldLT(FieldComputedAt, v))
|
||||
}
|
||||
|
||||
// ComputedAtLTE applies the LTE predicate on the "computed_at" field.
|
||||
func ComputedAtLTE(v int64) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldLTE(FieldComputedAt, v))
|
||||
}
|
||||
|
||||
// SyncedAtEQ applies the EQ predicate on the "synced_at" field.
|
||||
func SyncedAtEQ(v int64) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldEQ(FieldSyncedAt, v))
|
||||
}
|
||||
|
||||
// SyncedAtNEQ applies the NEQ predicate on the "synced_at" field.
|
||||
func SyncedAtNEQ(v int64) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldNEQ(FieldSyncedAt, v))
|
||||
}
|
||||
|
||||
// SyncedAtIn applies the In predicate on the "synced_at" field.
|
||||
func SyncedAtIn(vs ...int64) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldIn(FieldSyncedAt, vs...))
|
||||
}
|
||||
|
||||
// SyncedAtNotIn applies the NotIn predicate on the "synced_at" field.
|
||||
func SyncedAtNotIn(vs ...int64) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldNotIn(FieldSyncedAt, vs...))
|
||||
}
|
||||
|
||||
// SyncedAtGT applies the GT predicate on the "synced_at" field.
|
||||
func SyncedAtGT(v int64) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldGT(FieldSyncedAt, v))
|
||||
}
|
||||
|
||||
// SyncedAtGTE applies the GTE predicate on the "synced_at" field.
|
||||
func SyncedAtGTE(v int64) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldGTE(FieldSyncedAt, v))
|
||||
}
|
||||
|
||||
// SyncedAtLT applies the LT predicate on the "synced_at" field.
|
||||
func SyncedAtLT(v int64) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldLT(FieldSyncedAt, v))
|
||||
}
|
||||
|
||||
// SyncedAtLTE applies the LTE predicate on the "synced_at" field.
|
||||
func SyncedAtLTE(v int64) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.FieldLTE(FieldSyncedAt, v))
|
||||
}
|
||||
|
||||
// And groups predicates with the AND operator between them.
|
||||
func And(predicates ...predicate.ProducibleSnapshot) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.AndPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Or groups predicates with the OR operator between them.
|
||||
func Or(predicates ...predicate.ProducibleSnapshot) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.OrPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Not applies the not operator on the given predicate.
|
||||
func Not(p predicate.ProducibleSnapshot) predicate.ProducibleSnapshot {
|
||||
return predicate.ProducibleSnapshot(sql.NotPredicates(p))
|
||||
}
|
||||
Reference in New Issue
Block a user