Tag name changed: softdelete -> deleted
This commit is contained in:
parent
dabc882406
commit
3e99070567
|
@ -27,9 +27,9 @@ type Column struct {
|
|||
MapType int
|
||||
IsCreated bool
|
||||
IsUpdated bool
|
||||
IsDeleted bool
|
||||
IsCascade bool
|
||||
IsVersion bool
|
||||
IsSoftDelete bool
|
||||
fieldPath []string
|
||||
DefaultIsEmpty bool
|
||||
EnumOptions map[string]int
|
||||
|
@ -51,9 +51,9 @@ func NewColumn(name, fieldName string, sqlType SQLType, len1, len2 int, nullable
|
|||
MapType: TWOSIDES,
|
||||
IsCreated: false,
|
||||
IsUpdated: false,
|
||||
IsDeleted: false,
|
||||
IsCascade: false,
|
||||
IsVersion: false,
|
||||
IsSoftDelete: false,
|
||||
fieldPath: nil,
|
||||
DefaultIsEmpty: false,
|
||||
EnumOptions: make(map[string]int),
|
||||
|
|
12
table.go
12
table.go
|
@ -17,8 +17,8 @@ type Table struct {
|
|||
AutoIncrement string
|
||||
Created map[string]bool
|
||||
Updated string
|
||||
Deleted string
|
||||
Version string
|
||||
SoftDelete string
|
||||
Cacher Cacher
|
||||
StoreEngine string
|
||||
Charset string
|
||||
|
@ -84,8 +84,8 @@ func (table *Table) UpdatedColumn() *Column {
|
|||
return table.GetColumn(table.Updated)
|
||||
}
|
||||
|
||||
func (table *Table) SoftDeleteColumn() *Column {
|
||||
return table.GetColumn(table.SoftDelete)
|
||||
func (table *Table) DeletedColumn() *Column {
|
||||
return table.GetColumn(table.Deleted)
|
||||
}
|
||||
|
||||
// add a column to table
|
||||
|
@ -111,12 +111,12 @@ func (table *Table) AddColumn(col *Column) {
|
|||
if col.IsUpdated {
|
||||
table.Updated = col.Name
|
||||
}
|
||||
if col.IsDeleted {
|
||||
table.Deleted = col.Name
|
||||
}
|
||||
if col.IsVersion {
|
||||
table.Version = col.Name
|
||||
}
|
||||
if col.IsSoftDelete {
|
||||
table.SoftDelete = col.Name
|
||||
}
|
||||
}
|
||||
|
||||
// add an index or an unique to table
|
||||
|
|
Loading…
Reference in New Issue