Add authentication, styling needs to be fixed
# Conflicts: # starter/ent/runtime.go # starter/go.mod # starter/go.sum # starter/routes/routing.go
This commit is contained in:
@@ -19,8 +19,8 @@ const (
|
||||
FieldUpdatedAt = "updated_at"
|
||||
// FieldEmail holds the string denoting the email field in the database.
|
||||
FieldEmail = "email"
|
||||
// FieldPassword holds the string denoting the password field in the database.
|
||||
FieldPassword = "password"
|
||||
// FieldPasswordHash holds the string denoting the password_hash field in the database.
|
||||
FieldPasswordHash = "password_hash"
|
||||
// Table holds the table name of the user in the database.
|
||||
Table = "users"
|
||||
)
|
||||
@@ -31,7 +31,7 @@ var Columns = []string{
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
FieldEmail,
|
||||
FieldPassword,
|
||||
FieldPasswordHash,
|
||||
}
|
||||
|
||||
// ValidColumn reports if the column name is valid (part of the table columns).
|
||||
@@ -51,10 +51,8 @@ var (
|
||||
DefaultUpdatedAt func() time.Time
|
||||
// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
|
||||
UpdateDefaultUpdatedAt func() time.Time
|
||||
// DefaultEmail holds the default value on creation for the "email" field.
|
||||
DefaultEmail string
|
||||
// DefaultPassword holds the default value on creation for the "password" field.
|
||||
DefaultPassword string
|
||||
// DefaultPasswordHash holds the default value on creation for the "password_hash" field.
|
||||
DefaultPasswordHash string
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the User queries.
|
||||
@@ -80,7 +78,7 @@ func ByEmail(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldEmail, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByPassword orders the results by the password field.
|
||||
func ByPassword(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldPassword, opts...).ToFunc()
|
||||
// ByPasswordHash orders the results by the password_hash field.
|
||||
func ByPasswordHash(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldPasswordHash, opts...).ToFunc()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user