// Code generated by ent, DO NOT EDIT. package migrate import ( "entgo.io/ent/dialect/sql/schema" "entgo.io/ent/schema/field" ) var ( // ScaAuthPermissionRulesColumns holds the columns for the "sca_auth_permission_rules" table. ScaAuthPermissionRulesColumns = []*schema.Column{ {Name: "id", Type: field.TypeInt64, Increment: true, SchemaType: map[string]string{"mysql": "bigint(20) unsigned"}}, {Name: "ptype", Type: field.TypeString, Size: 100}, {Name: "v0", Type: field.TypeString, Size: 100}, {Name: "v1", Type: field.TypeString, Size: 100}, {Name: "v2", Type: field.TypeString, Nullable: true, Size: 100}, {Name: "v3", Type: field.TypeString, Nullable: true, Size: 100}, {Name: "v4", Type: field.TypeString, Nullable: true, Size: 100}, {Name: "v5", Type: field.TypeString, Nullable: true, Size: 100}, {Name: "sca_auth_role_sca_auth_permission_rule", Type: field.TypeInt64, Nullable: true, SchemaType: map[string]string{"mysql": "bigint(20)"}}, } // ScaAuthPermissionRulesTable holds the schema information for the "sca_auth_permission_rules" table. ScaAuthPermissionRulesTable = &schema.Table{ Name: "sca_auth_permission_rules", Columns: ScaAuthPermissionRulesColumns, PrimaryKey: []*schema.Column{ScaAuthPermissionRulesColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "sca_auth_permission_rules_sca_auth_roles_sca_auth_permission_rule", Columns: []*schema.Column{ScaAuthPermissionRulesColumns[8]}, RefColumns: []*schema.Column{ScaAuthRolesColumns[0]}, OnDelete: schema.SetNull, }, }, } // ScaAuthRolesColumns holds the columns for the "sca_auth_roles" table. ScaAuthRolesColumns = []*schema.Column{ {Name: "id", Type: field.TypeInt64, Increment: true, SchemaType: map[string]string{"mysql": "bigint(20)"}}, {Name: "role_name", Type: field.TypeString, Size: 32}, {Name: "role_key", Type: field.TypeString, Size: 64}, {Name: "created_at", Type: field.TypeTime}, {Name: "update_at", Type: field.TypeTime}, {Name: "deleted", Type: field.TypeInt, Default: 0}, } // ScaAuthRolesTable holds the schema information for the "sca_auth_roles" table. ScaAuthRolesTable = &schema.Table{ Name: "sca_auth_roles", Columns: ScaAuthRolesColumns, PrimaryKey: []*schema.Column{ScaAuthRolesColumns[0]}, } // ScaAuthUsersColumns holds the columns for the "sca_auth_users" table. ScaAuthUsersColumns = []*schema.Column{ {Name: "id", Type: field.TypeInt64, Increment: true, SchemaType: map[string]string{"mysql": "bigint(20)"}}, {Name: "uid", Type: field.TypeString, Unique: true, Size: 20}, {Name: "username", Type: field.TypeString, Nullable: true, Size: 32}, {Name: "nickname", Type: field.TypeString, Nullable: true, Size: 32}, {Name: "email", Type: field.TypeString, Nullable: true, Size: 32}, {Name: "phone", Type: field.TypeString, Nullable: true, Size: 32}, {Name: "password", Type: field.TypeString, Nullable: true, Size: 64}, {Name: "gender", Type: field.TypeString, Nullable: true, Size: 32}, {Name: "avatar", Type: field.TypeString, Nullable: true}, {Name: "status", Type: field.TypeInt8, Nullable: true, Default: 0}, {Name: "introduce", Type: field.TypeString, Nullable: true, Size: 255}, {Name: "created_at", Type: field.TypeTime}, {Name: "update_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted", Type: field.TypeInt8, Default: 0}, {Name: "blog", Type: field.TypeString, Nullable: true, Size: 30}, {Name: "location", Type: field.TypeString, Nullable: true, Size: 50}, {Name: "company", Type: field.TypeString, Nullable: true, Size: 50}, } // ScaAuthUsersTable holds the schema information for the "sca_auth_users" table. ScaAuthUsersTable = &schema.Table{ Name: "sca_auth_users", Columns: ScaAuthUsersColumns, PrimaryKey: []*schema.Column{ScaAuthUsersColumns[0]}, Indexes: []*schema.Index{ { Name: "scaauthuser_id", Unique: true, Columns: []*schema.Column{ScaAuthUsersColumns[0]}, }, { Name: "scaauthuser_uid", Unique: true, Columns: []*schema.Column{ScaAuthUsersColumns[1]}, }, { Name: "scaauthuser_phone", Unique: true, Columns: []*schema.Column{ScaAuthUsersColumns[5]}, }, }, } // ScaAuthUserDevicesColumns holds the columns for the "sca_auth_user_devices" table. ScaAuthUserDevicesColumns = []*schema.Column{ {Name: "id", Type: field.TypeInt64, Increment: true, SchemaType: map[string]string{"mysql": "bigint(20)"}}, {Name: "user_id", Type: field.TypeString, Size: 20}, {Name: "ip", Type: field.TypeString, Size: 20}, {Name: "location", Type: field.TypeString, Size: 20}, {Name: "agent", Type: field.TypeString, Size: 255}, {Name: "created_at", Type: field.TypeTime, Nullable: true}, {Name: "update_at", Type: field.TypeTime}, {Name: "deleted", Type: field.TypeInt, Default: 0}, {Name: "browser", Type: field.TypeString, Size: 20}, {Name: "operating_system", Type: field.TypeString, Size: 20}, {Name: "browser_version", Type: field.TypeString, Size: 20}, {Name: "mobile", Type: field.TypeInt}, {Name: "bot", Type: field.TypeInt}, {Name: "mozilla", Type: field.TypeString, Size: 10}, {Name: "platform", Type: field.TypeString, Size: 20}, {Name: "engine_name", Type: field.TypeString, Size: 20}, {Name: "engine_version", Type: field.TypeString, Size: 20}, {Name: "sca_auth_user_sca_auth_user_device", Type: field.TypeInt64, Nullable: true, SchemaType: map[string]string{"mysql": "bigint(20)"}}, } // ScaAuthUserDevicesTable holds the schema information for the "sca_auth_user_devices" table. ScaAuthUserDevicesTable = &schema.Table{ Name: "sca_auth_user_devices", Columns: ScaAuthUserDevicesColumns, PrimaryKey: []*schema.Column{ScaAuthUserDevicesColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "sca_auth_user_devices_sca_auth_users_sca_auth_user_device", Columns: []*schema.Column{ScaAuthUserDevicesColumns[17]}, RefColumns: []*schema.Column{ScaAuthUsersColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "scaauthuserdevice_id", Unique: true, Columns: []*schema.Column{ScaAuthUserDevicesColumns[0]}, }, }, } // ScaAuthUserSocialsColumns holds the columns for the "sca_auth_user_socials" table. ScaAuthUserSocialsColumns = []*schema.Column{ {Name: "id", Type: field.TypeInt64, Increment: true, SchemaType: map[string]string{"mysql": "bigint(20)"}}, {Name: "user_id", Type: field.TypeString, Size: 20}, {Name: "open_id", Type: field.TypeString, Size: 50}, {Name: "source", Type: field.TypeString, Size: 10}, {Name: "status", Type: field.TypeInt, Default: 0}, {Name: "created_at", Type: field.TypeTime}, {Name: "update_at", Type: field.TypeTime, Nullable: true}, {Name: "deleted", Type: field.TypeInt, Default: 0}, {Name: "sca_auth_user_sca_auth_user_social", Type: field.TypeInt64, Nullable: true, SchemaType: map[string]string{"mysql": "bigint(20)"}}, } // ScaAuthUserSocialsTable holds the schema information for the "sca_auth_user_socials" table. ScaAuthUserSocialsTable = &schema.Table{ Name: "sca_auth_user_socials", Columns: ScaAuthUserSocialsColumns, PrimaryKey: []*schema.Column{ScaAuthUserSocialsColumns[0]}, ForeignKeys: []*schema.ForeignKey{ { Symbol: "sca_auth_user_socials_sca_auth_users_sca_auth_user_social", Columns: []*schema.Column{ScaAuthUserSocialsColumns[8]}, RefColumns: []*schema.Column{ScaAuthUsersColumns[0]}, OnDelete: schema.SetNull, }, }, Indexes: []*schema.Index{ { Name: "scaauthusersocial_id_user_id_open_id", Unique: true, Columns: []*schema.Column{ScaAuthUserSocialsColumns[0], ScaAuthUserSocialsColumns[1], ScaAuthUserSocialsColumns[2]}, }, }, } // Tables holds all the tables in the schema. Tables = []*schema.Table{ ScaAuthPermissionRulesTable, ScaAuthRolesTable, ScaAuthUsersTable, ScaAuthUserDevicesTable, ScaAuthUserSocialsTable, } ) func init() { ScaAuthPermissionRulesTable.ForeignKeys[0].RefTable = ScaAuthRolesTable ScaAuthUserDevicesTable.ForeignKeys[0].RefTable = ScaAuthUsersTable ScaAuthUserSocialsTable.ForeignKeys[0].RefTable = ScaAuthUsersTable }