mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-27 18:21:58 +08:00

* fix: support multitenancy in org * fix: register and login working now * fix: changes to migration * fix: migrations run both on sqlite and postgres * fix: remove user flags from fe and be * fix: remove ingestion keys from update * fix: multitenancy support for apdex settings * fix: render ts for users correctly * fix: fix migration to run for new tenants * fix: clean up migrations * fix: address comments * Update pkg/sqlmigration/013_update_organization.go Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * fix: fix build * fix: force invites with org id * Update pkg/query-service/auth/auth.go Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * fix: address comments * fix: address comments * fix: provier with their own dialect * fix: update dialects * fix: remove unwanted change * Update pkg/query-service/app/http_handler.go Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * fix: different files for types --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
55 lines
1.8 KiB
Go
55 lines
1.8 KiB
Go
package types
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/uptrace/bun"
|
|
)
|
|
|
|
type Invite struct {
|
|
bun.BaseModel `bun:"table:invites"`
|
|
|
|
OrgID string `bun:"org_id,type:text,notnull" json:"orgId"`
|
|
ID int `bun:"id,pk,autoincrement" json:"id"`
|
|
Name string `bun:"name,type:text,notnull" json:"name"`
|
|
Email string `bun:"email,type:text,notnull,unique" json:"email"`
|
|
Token string `bun:"token,type:text,notnull" json:"token"`
|
|
CreatedAt time.Time `bun:"created_at,notnull" json:"createdAt"`
|
|
Role string `bun:"role,type:text,notnull" json:"role"`
|
|
}
|
|
|
|
type Group struct {
|
|
bun.BaseModel `bun:"table:groups"`
|
|
|
|
TimeAuditable
|
|
OrgID string `bun:"org_id,type:text"`
|
|
ID string `bun:"id,pk,type:text" json:"id"`
|
|
Name string `bun:"name,type:text,notnull,unique" json:"name"`
|
|
}
|
|
|
|
type GettableUser struct {
|
|
User
|
|
Role string `json:"role"`
|
|
Organization string `json:"organization"`
|
|
}
|
|
|
|
type User struct {
|
|
bun.BaseModel `bun:"table:users"`
|
|
|
|
TimeAuditable
|
|
ID string `bun:"id,pk,type:text" json:"id"`
|
|
Name string `bun:"name,type:text,notnull" json:"name"`
|
|
Email string `bun:"email,type:text,notnull,unique" json:"email"`
|
|
Password string `bun:"password,type:text,notnull" json:"-"`
|
|
ProfilePictureURL string `bun:"profile_picture_url,type:text" json:"profilePictureURL"`
|
|
GroupID string `bun:"group_id,type:text,notnull" json:"groupId"`
|
|
OrgID string `bun:"org_id,type:text,notnull" json:"orgId"`
|
|
}
|
|
|
|
type ResetPasswordRequest struct {
|
|
bun.BaseModel `bun:"table:reset_password_request"`
|
|
ID int `bun:"id,pk,autoincrement" json:"id"`
|
|
Token string `bun:"token,type:text,notnull" json:"token"`
|
|
UserID string `bun:"user_id,type:text,notnull" json:"userId"`
|
|
}
|