test delete
This commit is contained in:
@ -15,6 +15,8 @@ const (
|
||||
FieldUsername = "username"
|
||||
// FieldDid holds the string denoting the did field in the database.
|
||||
FieldDid = "did"
|
||||
// FieldDelete holds the string denoting the delete field in the database.
|
||||
FieldDelete = "delete"
|
||||
// FieldToken holds the string denoting the token field in the database.
|
||||
FieldToken = "token"
|
||||
// FieldPassword holds the string denoting the password field in the database.
|
||||
@ -43,6 +45,7 @@ var Columns = []string{
|
||||
FieldID,
|
||||
FieldUsername,
|
||||
FieldDid,
|
||||
FieldDelete,
|
||||
FieldToken,
|
||||
FieldPassword,
|
||||
FieldCreatedAt,
|
||||
@ -74,6 +77,8 @@ func ValidColumn(column string) bool {
|
||||
var (
|
||||
// UsernameValidator is a validator for the "username" field. It is called by the builders before save.
|
||||
UsernameValidator func(string) error
|
||||
// DefaultDelete holds the default value on creation for the "delete" field.
|
||||
DefaultDelete bool
|
||||
// PasswordValidator is a validator for the "password" field. It is called by the builders before save.
|
||||
PasswordValidator func(string) error
|
||||
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
||||
|
@ -65,6 +65,11 @@ func Did(v string) predicate.User {
|
||||
return predicate.User(sql.FieldEQ(FieldDid, v))
|
||||
}
|
||||
|
||||
// Delete applies equality check predicate on the "delete" field. It's identical to DeleteEQ.
|
||||
func Delete(v bool) predicate.User {
|
||||
return predicate.User(sql.FieldEQ(FieldDelete, v))
|
||||
}
|
||||
|
||||
// Token applies equality check predicate on the "token" field. It's identical to TokenEQ.
|
||||
func Token(v string) predicate.User {
|
||||
return predicate.User(sql.FieldEQ(FieldToken, v))
|
||||
@ -230,6 +235,26 @@ func DidContainsFold(v string) predicate.User {
|
||||
return predicate.User(sql.FieldContainsFold(FieldDid, v))
|
||||
}
|
||||
|
||||
// DeleteEQ applies the EQ predicate on the "delete" field.
|
||||
func DeleteEQ(v bool) predicate.User {
|
||||
return predicate.User(sql.FieldEQ(FieldDelete, v))
|
||||
}
|
||||
|
||||
// DeleteNEQ applies the NEQ predicate on the "delete" field.
|
||||
func DeleteNEQ(v bool) predicate.User {
|
||||
return predicate.User(sql.FieldNEQ(FieldDelete, v))
|
||||
}
|
||||
|
||||
// DeleteIsNil applies the IsNil predicate on the "delete" field.
|
||||
func DeleteIsNil() predicate.User {
|
||||
return predicate.User(sql.FieldIsNull(FieldDelete))
|
||||
}
|
||||
|
||||
// DeleteNotNil applies the NotNil predicate on the "delete" field.
|
||||
func DeleteNotNil() predicate.User {
|
||||
return predicate.User(sql.FieldNotNull(FieldDelete))
|
||||
}
|
||||
|
||||
// TokenEQ applies the EQ predicate on the "token" field.
|
||||
func TokenEQ(v string) predicate.User {
|
||||
return predicate.User(sql.FieldEQ(FieldToken, v))
|
||||
|
Reference in New Issue
Block a user