重命名包为 core
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"platform/web/common"
|
||||
"platform/web/core"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
@@ -14,16 +14,16 @@ const TableNameAnnouncement = "announcement"
|
||||
|
||||
// Announcement mapped from table <announcement>
|
||||
type Announcement struct {
|
||||
CreatedAt common.LocalDateTime `gorm:"column:created_at;default:CURRENT_TIMESTAMP" json:"created_at"`
|
||||
UpdatedAt common.LocalDateTime `gorm:"column:updated_at;default:CURRENT_TIMESTAMP" json:"updated_at"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"`
|
||||
ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
|
||||
Type int32 `gorm:"column:type;not null;default:1" json:"type"`
|
||||
Status int32 `gorm:"column:status;not null;default:1" json:"status"`
|
||||
Sort int32 `gorm:"column:sort;not null" json:"sort"`
|
||||
Pin bool `gorm:"column:pin;not null" json:"pin"`
|
||||
Title string `gorm:"column:title;not null" json:"title"`
|
||||
Content string `gorm:"column:content;not null" json:"content"`
|
||||
CreatedAt core.LocalDateTime `gorm:"column:created_at;default:CURRENT_TIMESTAMP" json:"created_at"`
|
||||
UpdatedAt core.LocalDateTime `gorm:"column:updated_at;default:CURRENT_TIMESTAMP" json:"updated_at"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"`
|
||||
ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
|
||||
Type int32 `gorm:"column:type;not null;default:1" json:"type"`
|
||||
Status int32 `gorm:"column:status;not null;default:1" json:"status"`
|
||||
Sort int32 `gorm:"column:sort;not null" json:"sort"`
|
||||
Pin bool `gorm:"column:pin;not null" json:"pin"`
|
||||
Title string `gorm:"column:title;not null" json:"title"`
|
||||
Content string `gorm:"column:content" json:"content"`
|
||||
}
|
||||
|
||||
// TableName Announcement's table name
|
||||
|
||||
Reference in New Issue
Block a user