1
0

test token

This commit is contained in:
2023-04-18 21:18:38 +09:00
parent c892ba3d8f
commit 41b6201a10
18 changed files with 380 additions and 64 deletions

View File

@ -15,6 +15,8 @@ const (
FieldUsername = "username"
// FieldDid holds the string denoting the did field in the database.
FieldDid = "did"
// FieldToken holds the string denoting the token field in the database.
FieldToken = "token"
// FieldPassword holds the string denoting the password field in the database.
FieldPassword = "password"
// FieldCreatedAt holds the string denoting the created_at field in the database.
@ -41,6 +43,7 @@ var Columns = []string{
FieldID,
FieldUsername,
FieldDid,
FieldToken,
FieldPassword,
FieldCreatedAt,
FieldUpdatedAt,

View File

@ -65,6 +65,11 @@ func Did(v string) predicate.User {
return predicate.User(sql.FieldEQ(FieldDid, 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))
}
// Password applies equality check predicate on the "password" field. It's identical to PasswordEQ.
func Password(v string) predicate.User {
return predicate.User(sql.FieldEQ(FieldPassword, v))
@ -225,6 +230,81 @@ func DidContainsFold(v string) predicate.User {
return predicate.User(sql.FieldContainsFold(FieldDid, v))
}
// TokenEQ applies the EQ predicate on the "token" field.
func TokenEQ(v string) predicate.User {
return predicate.User(sql.FieldEQ(FieldToken, v))
}
// TokenNEQ applies the NEQ predicate on the "token" field.
func TokenNEQ(v string) predicate.User {
return predicate.User(sql.FieldNEQ(FieldToken, v))
}
// TokenIn applies the In predicate on the "token" field.
func TokenIn(vs ...string) predicate.User {
return predicate.User(sql.FieldIn(FieldToken, vs...))
}
// TokenNotIn applies the NotIn predicate on the "token" field.
func TokenNotIn(vs ...string) predicate.User {
return predicate.User(sql.FieldNotIn(FieldToken, vs...))
}
// TokenGT applies the GT predicate on the "token" field.
func TokenGT(v string) predicate.User {
return predicate.User(sql.FieldGT(FieldToken, v))
}
// TokenGTE applies the GTE predicate on the "token" field.
func TokenGTE(v string) predicate.User {
return predicate.User(sql.FieldGTE(FieldToken, v))
}
// TokenLT applies the LT predicate on the "token" field.
func TokenLT(v string) predicate.User {
return predicate.User(sql.FieldLT(FieldToken, v))
}
// TokenLTE applies the LTE predicate on the "token" field.
func TokenLTE(v string) predicate.User {
return predicate.User(sql.FieldLTE(FieldToken, v))
}
// TokenContains applies the Contains predicate on the "token" field.
func TokenContains(v string) predicate.User {
return predicate.User(sql.FieldContains(FieldToken, v))
}
// TokenHasPrefix applies the HasPrefix predicate on the "token" field.
func TokenHasPrefix(v string) predicate.User {
return predicate.User(sql.FieldHasPrefix(FieldToken, v))
}
// TokenHasSuffix applies the HasSuffix predicate on the "token" field.
func TokenHasSuffix(v string) predicate.User {
return predicate.User(sql.FieldHasSuffix(FieldToken, v))
}
// TokenIsNil applies the IsNil predicate on the "token" field.
func TokenIsNil() predicate.User {
return predicate.User(sql.FieldIsNull(FieldToken))
}
// TokenNotNil applies the NotNil predicate on the "token" field.
func TokenNotNil() predicate.User {
return predicate.User(sql.FieldNotNull(FieldToken))
}
// TokenEqualFold applies the EqualFold predicate on the "token" field.
func TokenEqualFold(v string) predicate.User {
return predicate.User(sql.FieldEqualFold(FieldToken, v))
}
// TokenContainsFold applies the ContainsFold predicate on the "token" field.
func TokenContainsFold(v string) predicate.User {
return predicate.User(sql.FieldContainsFold(FieldToken, v))
}
// PasswordEQ applies the EQ predicate on the "password" field.
func PasswordEQ(v string) predicate.User {
return predicate.User(sql.FieldEQ(FieldPassword, v))