forked from JointCloud/pcm-coordinator
15 lines
579 B
Go
15 lines
579 B
Go
package base
|
|
|
|
import (
|
|
"gorm.io/gorm"
|
|
"time"
|
|
)
|
|
|
|
type BaseModel struct {
|
|
DeletedAt gorm.DeletedAt `gorm:"index;comment:删除时间" json:"-"` // 删除时间
|
|
CreatedBy uint `gorm:"created_by;comment:创建人" json:"createdBy"` //创建人
|
|
CreateTime time.Time `gorm:"autoCreateTime:nano;comment:创建时间" json:"-"` // 创建时间
|
|
UpdatedBy uint `gorm:"updated_by;comment:更新人" json:"UpdatedBy"` //创建人
|
|
UpdateTime time.Time `gorm:"autoUpdateTime:nano;;comment:更新时间" json:"-"` // 更新时间
|
|
}
|