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:
Achim Rohn
2026-03-20 20:35:20 +00:00
parent f768e9e47c
commit a15ca501b8
34 changed files with 468 additions and 258 deletions
+8 -10
View File
@@ -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()
}