Tag name changed: softdelete -> deleted

This commit is contained in:
oinume 2014-11-05 15:28:37 +09:00
parent dabc882406
commit 3e99070567
2 changed files with 8 additions and 8 deletions

View File

@ -27,9 +27,9 @@ type Column struct {
MapType int MapType int
IsCreated bool IsCreated bool
IsUpdated bool IsUpdated bool
IsDeleted bool
IsCascade bool IsCascade bool
IsVersion bool IsVersion bool
IsSoftDelete bool
fieldPath []string fieldPath []string
DefaultIsEmpty bool DefaultIsEmpty bool
EnumOptions map[string]int EnumOptions map[string]int
@ -51,9 +51,9 @@ func NewColumn(name, fieldName string, sqlType SQLType, len1, len2 int, nullable
MapType: TWOSIDES, MapType: TWOSIDES,
IsCreated: false, IsCreated: false,
IsUpdated: false, IsUpdated: false,
IsDeleted: false,
IsCascade: false, IsCascade: false,
IsVersion: false, IsVersion: false,
IsSoftDelete: false,
fieldPath: nil, fieldPath: nil,
DefaultIsEmpty: false, DefaultIsEmpty: false,
EnumOptions: make(map[string]int), EnumOptions: make(map[string]int),

View File

@ -17,8 +17,8 @@ type Table struct {
AutoIncrement string AutoIncrement string
Created map[string]bool Created map[string]bool
Updated string Updated string
Deleted string
Version string Version string
SoftDelete string
Cacher Cacher Cacher Cacher
StoreEngine string StoreEngine string
Charset string Charset string
@ -84,8 +84,8 @@ func (table *Table) UpdatedColumn() *Column {
return table.GetColumn(table.Updated) return table.GetColumn(table.Updated)
} }
func (table *Table) SoftDeleteColumn() *Column { func (table *Table) DeletedColumn() *Column {
return table.GetColumn(table.SoftDelete) return table.GetColumn(table.Deleted)
} }
// add a column to table // add a column to table
@ -111,12 +111,12 @@ func (table *Table) AddColumn(col *Column) {
if col.IsUpdated { if col.IsUpdated {
table.Updated = col.Name table.Updated = col.Name
} }
if col.IsDeleted {
table.Deleted = col.Name
}
if col.IsVersion { if col.IsVersion {
table.Version = col.Name table.Version = col.Name
} }
if col.IsSoftDelete {
table.SoftDelete = col.Name
}
} }
// add an index or an unique to table // add an index or an unique to table