parent
820f6bb6c3
commit
c5e4a93b51
|
@ -0,0 +1,203 @@
|
|||
package gocnjhelper
|
||||
|
||||
import "github.com/scylladb/gocqlx/v2/table"
|
||||
|
||||
var (
|
||||
DbMUsers = table.New(table.Metadata{
|
||||
Name: "users",
|
||||
Columns: []string{
|
||||
"id",
|
||||
"username",
|
||||
"account_name",
|
||||
"account_name_lc",
|
||||
"email",
|
||||
"password",
|
||||
"description",
|
||||
"latitude",
|
||||
"longitude",
|
||||
"xp_level",
|
||||
"xp_points",
|
||||
"followers_count",
|
||||
"following_count",
|
||||
"account_status",
|
||||
"avatar_url",
|
||||
"public_keys",
|
||||
"created_at",
|
||||
"updated_at"},
|
||||
PartKey: []string{"id"},
|
||||
})
|
||||
|
||||
DbMUsersSignInEmailHelper = table.New(table.Metadata{
|
||||
Name: "users",
|
||||
Columns: []string{
|
||||
"id",
|
||||
"password",
|
||||
"account_status",
|
||||
},
|
||||
PartKey: []string{"email"},
|
||||
})
|
||||
|
||||
DbMUserMails = table.New(table.Metadata{
|
||||
Name: "user_mails",
|
||||
Columns: []string{
|
||||
"id",
|
||||
"user_id",
|
||||
"status",
|
||||
"created_at",
|
||||
"expires_at",
|
||||
},
|
||||
PartKey: []string{"id"},
|
||||
SortKey: []string{"user_id"},
|
||||
})
|
||||
|
||||
DbMSessions = table.New(table.Metadata{
|
||||
Name: "sessions",
|
||||
Columns: []string{
|
||||
"id",
|
||||
"user_id",
|
||||
"fcm_token",
|
||||
"encryption_key",
|
||||
"user_agent",
|
||||
"app_version",
|
||||
"ip",
|
||||
"last_used",
|
||||
"created_at"},
|
||||
PartKey: []string{"id"},
|
||||
})
|
||||
|
||||
DbMWebSocketSessions = table.New(table.Metadata{
|
||||
Name: "ws_sessions",
|
||||
Columns: []string{
|
||||
"id",
|
||||
"user_id",
|
||||
"user_agent",
|
||||
"ip",
|
||||
"last_used",
|
||||
"created_at"},
|
||||
PartKey: []string{"id"},
|
||||
})
|
||||
|
||||
DbMEvents = table.New(table.Metadata{
|
||||
Name: "events",
|
||||
Columns: []string{
|
||||
"id",
|
||||
"user_id",
|
||||
"analytics_id",
|
||||
"type",
|
||||
"accession_type",
|
||||
"name",
|
||||
"tags",
|
||||
"description",
|
||||
"latitude",
|
||||
"longitude",
|
||||
"authentication_type",
|
||||
"voting",
|
||||
"participants",
|
||||
"participants_count",
|
||||
"max_participants",
|
||||
"start_of_event",
|
||||
"end_of_event",
|
||||
"created_at",
|
||||
"updated_at"},
|
||||
PartKey: []string{"id"},
|
||||
})
|
||||
|
||||
DbMEventFaqs = table.New(table.Metadata{
|
||||
Name: "event_faqs",
|
||||
Columns: []string{
|
||||
"id",
|
||||
"event_id",
|
||||
"user_id",
|
||||
"question",
|
||||
"created_at",
|
||||
"updated_at",
|
||||
},
|
||||
})
|
||||
|
||||
DbMEventFaqAnwers = table.New(table.Metadata{
|
||||
Name: "event_faq_anwers",
|
||||
Columns: []string{
|
||||
"id",
|
||||
"faq_id",
|
||||
"user_id",
|
||||
"answer",
|
||||
"votes",
|
||||
"created_at",
|
||||
"updated_at",
|
||||
},
|
||||
})
|
||||
|
||||
DbMUserSignUpProcess = table.New(table.Metadata{
|
||||
Name: "user_sign_up_process",
|
||||
Columns: []string{
|
||||
"x_token",
|
||||
"email",
|
||||
"user_agent",
|
||||
"ip",
|
||||
"email_verify_code",
|
||||
"email_verified",
|
||||
"last_email_resend",
|
||||
"created_at",
|
||||
"expires_at",
|
||||
},
|
||||
PartKey: []string{"x_token"},
|
||||
})
|
||||
|
||||
DbMUserSignUpProcessHelper = table.New(table.Metadata{
|
||||
Name: "user_sign_up_process",
|
||||
Columns: []string{
|
||||
"x_token",
|
||||
"email_verify_code",
|
||||
},
|
||||
PartKey: []string{"x_token", "email_verify_code"},
|
||||
})
|
||||
|
||||
DbMUserSignUpProcessHelperEmail = table.New(table.Metadata{
|
||||
Name: "user_sign_up_process",
|
||||
Columns: []string{
|
||||
"email",
|
||||
},
|
||||
PartKey: []string{"email"},
|
||||
})
|
||||
|
||||
DbMUserRelationship = table.New(table.Metadata{
|
||||
Name: "user_relationship",
|
||||
Columns: []string{
|
||||
"user_first_id",
|
||||
"user_second_id",
|
||||
"user_first_following_state",
|
||||
"user_second_following_state",
|
||||
"blocked_state",
|
||||
"created_at",
|
||||
"updated_at",
|
||||
},
|
||||
PartKey: []string{"user_first_id", "user_second_id"},
|
||||
})
|
||||
|
||||
DbMUserPrivacySettings = table.New(table.Metadata{
|
||||
Name: "user_privacy_settings",
|
||||
Columns: []string{
|
||||
"user_id",
|
||||
"username",
|
||||
"avatar",
|
||||
"description",
|
||||
"location",
|
||||
"created_at",
|
||||
"updated_at",
|
||||
},
|
||||
PartKey: []string{"user_id"},
|
||||
})
|
||||
|
||||
DbMChats = table.New(table.Metadata{
|
||||
Name: "chats",
|
||||
Columns: []string{
|
||||
"user_first_id",
|
||||
"user_second_id",
|
||||
"sync_count",
|
||||
"last_messages",
|
||||
"blocked_state",
|
||||
"created_at",
|
||||
},
|
||||
PartKey: []string{"user_first_id", "user_second_id"},
|
||||
})
|
||||
)
|
Loading…
Reference in New Issue