Procházet zdrojové kódy

column,table实体添加注释属性

xormplus před 8 roky
rodič
revize
1c7322c734
2 změnil soubory, kde provedl 3 přidání a 0 odebrání
  1. 2 0
      column.go
  2. 1 0
      table.go

+ 2 - 0
column.go

@@ -37,6 +37,7 @@ type Column struct {
 	SetOptions      map[string]int
 	SetOptions      map[string]int
 	DisableTimeZone bool
 	DisableTimeZone bool
 	TimeZone        *time.Location // column specified time zone
 	TimeZone        *time.Location // column specified time zone
+	Comment         string
 }
 }
 
 
 func NewColumn(name, fieldName string, sqlType SQLType, len1, len2 int, nullable bool) *Column {
 func NewColumn(name, fieldName string, sqlType SQLType, len1, len2 int, nullable bool) *Column {
@@ -60,6 +61,7 @@ func NewColumn(name, fieldName string, sqlType SQLType, len1, len2 int, nullable
 		IsVersion:       false,
 		IsVersion:       false,
 		DefaultIsEmpty:  false,
 		DefaultIsEmpty:  false,
 		EnumOptions:     make(map[string]int),
 		EnumOptions:     make(map[string]int),
+		Comment:         "",
 	}
 	}
 }
 }
 
 

+ 1 - 0
table.go

@@ -22,6 +22,7 @@ type Table struct {
 	Cacher        Cacher
 	Cacher        Cacher
 	StoreEngine   string
 	StoreEngine   string
 	Charset       string
 	Charset       string
+	Comment       string
 }
 }
 
 
 func (table *Table) Columns() []*Column {
 func (table *Table) Columns() []*Column {