feat(schema): 添加基础混入定义公共时间字段

This commit is contained in:
unclesam committed 2026-07-07 19:43:16 +08:00
1 parent 5281459fcb
commit fe86c081f4
16 files changed
+1715 -14

No files matched your search

+7
View File
@@ -11,6 +11,13 @@ var (
// UsersColumns holds the columns for the "users" table.
UsersColumns = []*schema.Column{
{Name: "id", Type: field.TypeInt, Increment: true},
{Name: "created_at", Type: field.TypeTime},
{Name: "updated_at", Type: field.TypeTime},
{Name: "username", Type: field.TypeString, Unique: true},
{Name: "password", Type: field.TypeString},
{Name: "email", Type: field.TypeString, Nullable: true},
{Name: "ip", Type: field.TypeString, Nullable: true},
{Name: "addr", Type: field.TypeString, Nullable: true, Size: 500},
}
// UsersTable holds the schema information for the "users" table.
UsersTable = &schema.Table{