chore(model): create build, stage, step and logs table

Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi.Wu
2022-09-01 11:03:50 +08:00
committed by Jason Song
parent e05f224d19
commit e07d416366
7 changed files with 66 additions and 31 deletions

31
models/bots/build_step.go Normal file
View File

@ -0,0 +1,31 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package bots
import (
"code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/modules/timeutil"
)
type BuildStep struct {
ID int64
StageID int64 `xorm:"index"`
Number int64
Name string
Kind string
Type string
Status BuildStatus
Started timeutil.TimeStamp
Stopped timeutil.TimeStamp
Created timeutil.TimeStamp `xorm:"created"`
}
func (bj BuildStep) TableName() string {
return "bots_build_step"
}
func init() {
db.RegisterModel(new(BuildStep))
}