提交
This commit is contained in:
@@ -37,6 +37,8 @@ const (
|
||||
FieldSafetyStock = "safety_stock"
|
||||
// FieldIsActive holds the string denoting the is_active field in the database.
|
||||
FieldIsActive = "is_active"
|
||||
// FieldSyncPending holds the string denoting the sync_pending field in the database.
|
||||
FieldSyncPending = "sync_pending"
|
||||
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
||||
FieldCreatedAt = "created_at"
|
||||
// FieldUpdatedAt holds the string denoting the updated_at field in the database.
|
||||
@@ -61,6 +63,7 @@ var Columns = []string{
|
||||
FieldTemplateCode,
|
||||
FieldSafetyStock,
|
||||
FieldIsActive,
|
||||
FieldSyncPending,
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
}
|
||||
@@ -90,6 +93,8 @@ var (
|
||||
DefaultSafetyStock int
|
||||
// DefaultIsActive holds the default value on creation for the "is_active" field.
|
||||
DefaultIsActive bool
|
||||
// DefaultSyncPending holds the default value on creation for the "sync_pending" field.
|
||||
DefaultSyncPending bool
|
||||
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
||||
DefaultCreatedAt func() int64
|
||||
// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
|
||||
@@ -169,6 +174,11 @@ func ByIsActive(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldIsActive, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySyncPending orders the results by the sync_pending field.
|
||||
func BySyncPending(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSyncPending, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreatedAt orders the results by the created_at field.
|
||||
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
||||
|
||||
@@ -118,6 +118,11 @@ func IsActive(v bool) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldIsActive, v))
|
||||
}
|
||||
|
||||
// SyncPending applies equality check predicate on the "sync_pending" field. It's identical to SyncPendingEQ.
|
||||
func SyncPending(v bool) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldSyncPending, v))
|
||||
}
|
||||
|
||||
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
||||
func CreatedAt(v int64) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldCreatedAt, v))
|
||||
@@ -748,6 +753,16 @@ func IsActiveNEQ(v bool) predicate.Material {
|
||||
return predicate.Material(sql.FieldNEQ(FieldIsActive, v))
|
||||
}
|
||||
|
||||
// SyncPendingEQ applies the EQ predicate on the "sync_pending" field.
|
||||
func SyncPendingEQ(v bool) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldSyncPending, v))
|
||||
}
|
||||
|
||||
// SyncPendingNEQ applies the NEQ predicate on the "sync_pending" field.
|
||||
func SyncPendingNEQ(v bool) predicate.Material {
|
||||
return predicate.Material(sql.FieldNEQ(FieldSyncPending, v))
|
||||
}
|
||||
|
||||
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
||||
func CreatedAtEQ(v int64) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldCreatedAt, v))
|
||||
|
||||
Reference in New Issue
Block a user