pre-dev: initial commit
This commit is contained in:
No files matched your search
@@ -0,0 +1,31 @@
|
||||
package core
|
||||
|
||||
import "gorm.io/gorm"
|
||||
|
||||
type Base struct {
|
||||
CreatedAt string `json:"createdAt"`
|
||||
UpdatedAt string `json:"updatedAt"`
|
||||
DeteledAt gorm.DeletedAt `json:"deletedAt,omitempty"`
|
||||
}
|
||||
|
||||
//
|
||||
type Main struct {
|
||||
Id uint `json:"id" gorm:"primaryKey"` // depends on the system architecture
|
||||
Base
|
||||
}
|
||||
|
||||
type TinyMain struct {
|
||||
Id uint8 `json:"id" gorm:"primaryKey"`
|
||||
Base
|
||||
}
|
||||
|
||||
type SmallMain struct {
|
||||
Id uint16 `json:"id" gorm:"primaryKey"`
|
||||
Base
|
||||
}
|
||||
|
||||
// Mainly for transaction
|
||||
type BigMain struct {
|
||||
Id uint64 `json:"id" gorm:"primaryKey"`
|
||||
Base
|
||||
}
|
||||
Reference in New Issue
Block a user