chore: rollback PR #18081 (#18104)

Rollback https://github.com/coder/coder/pull/18081
This commit is contained in:
Bruno Quaresma
2025-05-29 13:12:13 -03:00
committed by GitHub
parent 345001ffd1
commit d779126ee3
56 changed files with 146 additions and 164 deletions

View File

@ -26,12 +26,12 @@ const (
// Workspace is a deployment of a template. It references a specific
// version and can be updated.
type Workspace struct {
ID uuid.UUID `json:"id" format:"uuid"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
OwnerID uuid.UUID `json:"owner_id" format:"uuid"`
OwnerName string `json:"owner_name,omitempty"`
OwnerUsername string `json:"owner_username"`
ID uuid.UUID `json:"id" format:"uuid"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
OwnerID uuid.UUID `json:"owner_id" format:"uuid"`
// OwnerName is the username of the owner of the workspace.
OwnerName string `json:"owner_name"`
OwnerAvatarURL string `json:"owner_avatar_url"`
OrganizationID uuid.UUID `json:"organization_id" format:"uuid"`
OrganizationName string `json:"organization_name"`
@ -50,7 +50,6 @@ type Workspace struct {
AutostartSchedule *string `json:"autostart_schedule,omitempty"`
TTLMillis *int64 `json:"ttl_ms,omitempty"`
LastUsedAt time.Time `json:"last_used_at" format:"date-time"`
// DeletingAt indicates the time at which the workspace will be permanently deleted.
// A workspace is eligible for deletion if it is dormant (a non-nil dormant_at value)
// and a value has been specified for time_til_dormant_autodelete on its template.
@ -70,7 +69,7 @@ type Workspace struct {
}
func (w Workspace) FullName() string {
return fmt.Sprintf("%s/%s", w.OwnerUsername, w.Name)
return fmt.Sprintf("%s/%s", w.OwnerName, w.Name)
}
type WorkspaceHealth struct {