UPDATE: new db
All checks were successful
Build and Release / release (push) Successful in 1m30s

This commit is contained in:
2026-05-05 16:57:44 +07:00
parent 8b440ad5c8
commit 29944915cd
25 changed files with 893 additions and 110 deletions

View File

@@ -181,6 +181,31 @@ func (q *Queries) GetEntityById(ctx context.Context, id pgtype.UUID) (Entity, er
return i, err
}
const getEntityBySlug = `-- name: GetEntityBySlug :one
SELECT id, project_id, name, slug, description, status, time_start, time_end, is_deleted, created_at, updated_at
FROM entities
WHERE slug = $1 AND is_deleted = false
`
func (q *Queries) GetEntityBySlug(ctx context.Context, slug pgtype.Text) (Entity, error) {
row := q.db.QueryRow(ctx, getEntityBySlug, slug)
var i Entity
err := row.Scan(
&i.ID,
&i.ProjectID,
&i.Name,
&i.Slug,
&i.Description,
&i.Status,
&i.TimeStart,
&i.TimeEnd,
&i.IsDeleted,
&i.CreatedAt,
&i.UpdatedAt,
)
return i, err
}
const searchEntities = `-- name: SearchEntities :many
SELECT id, project_id, name, slug, description, status, time_start, time_end, is_deleted, created_at, updated_at
FROM entities