33 lines
922 B
Go
33 lines
922 B
Go
package model
|
|
|
|
import "time"
|
|
|
|
type Created struct {
|
|
CreatedAt time.Time `bun:"type:timestamptz,notnull" json:"createdAt" time_format:"simple_datetime" time_location:"shanghai"`
|
|
}
|
|
|
|
type CreatedWithUser struct {
|
|
Created `bun:"extend"`
|
|
CreatedBy *string `json:"createdBy"`
|
|
}
|
|
|
|
type Deleted struct {
|
|
DeletedAt *time.Time `bun:"type:timestamptz,soft_delete,nullzero" json:"deletedAt" time_format:"simple_datetime" time_location:"shanghai"`
|
|
}
|
|
|
|
type DeletedWithUser struct {
|
|
Deleted `bun:"extend"`
|
|
DeletedBy *string `json:"deletedBy"`
|
|
}
|
|
|
|
type CreatedAndModified struct {
|
|
Created `bun:"extend"`
|
|
LastModifiedAt *time.Time `bun:"type:timestamptz,nullzero" json:"lastModifiedAt" time_format:"simple_datetime" time_location:"shanghai"`
|
|
}
|
|
|
|
type CreatedAndModifiedWithUser struct {
|
|
CreatedAndModified `bun:"extend"`
|
|
CreatedBy *string `json:"createdBy"`
|
|
LastModifiedBy *string `json:"lastModifiedBy"`
|
|
}
|