mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
coderd: autostart: codersdk, http api, database plumbing (#879)
* feat: add columns autostart_schedule, autostop_schedule to database schema * feat: database: add UpdateWorkspaceAutostart and UpdateWorkspaceAutostop methods * feat: add AutostartSchedule/AutostopSchedule to api workspace struct * feat: codersdk: implement update workspace autostart and autostop methods * chore: add unit tests for workspace autostarat and autostop methods
This commit is contained in:
@ -388,13 +388,15 @@ type User struct {
|
||||
}
|
||||
|
||||
type Workspace struct {
|
||||
ID uuid.UUID `db:"id" json:"id"`
|
||||
CreatedAt time.Time `db:"created_at" json:"created_at"`
|
||||
UpdatedAt time.Time `db:"updated_at" json:"updated_at"`
|
||||
OwnerID uuid.UUID `db:"owner_id" json:"owner_id"`
|
||||
TemplateID uuid.UUID `db:"template_id" json:"template_id"`
|
||||
Deleted bool `db:"deleted" json:"deleted"`
|
||||
Name string `db:"name" json:"name"`
|
||||
ID uuid.UUID `db:"id" json:"id"`
|
||||
CreatedAt time.Time `db:"created_at" json:"created_at"`
|
||||
UpdatedAt time.Time `db:"updated_at" json:"updated_at"`
|
||||
OwnerID uuid.UUID `db:"owner_id" json:"owner_id"`
|
||||
TemplateID uuid.UUID `db:"template_id" json:"template_id"`
|
||||
Deleted bool `db:"deleted" json:"deleted"`
|
||||
Name string `db:"name" json:"name"`
|
||||
AutostartSchedule sql.NullString `db:"autostart_schedule" json:"autostart_schedule"`
|
||||
AutostopSchedule sql.NullString `db:"autostop_schedule" json:"autostop_schedule"`
|
||||
}
|
||||
|
||||
type WorkspaceAgent struct {
|
||||
|
Reference in New Issue
Block a user