mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-07-30 15:52:00 +08:00

* feat(sqlmigration): update the alertmanager tables * feat(sqlmigration): update the alertmanager tables * feat(sqlmigration): make the preference package multi tenant * feat(preference): address nit pick comments * feat(preference): added the cascade delete for preferences * feat(sqlmigration): update apdex and TTL status tables (#7481) * feat(sqlmigration): update the apdex and ttl tables * feat(sqlmigration): register the new migration and rename table * feat(sqlmigration): fix the ttl queries * feat(sqlmigration): update the TTL and apdex tables * feat(sqlmigration): update the TTL and apdex tables * feat(sqlmigration): fix the reset password and pat tables (#7482) * feat(sqlmigration): fix the reset password and pat tables * feat(sqlmigration): revert PAT changes * feat(sqlmigration): register and rename the new migration * feat(sqlmigration): handle updates for user tables * feat(sqlmigration): remove unwanted changes
53 lines
1.6 KiB
Go
53 lines
1.6 KiB
Go
package types
|
|
|
|
import (
|
|
"github.com/uptrace/bun"
|
|
)
|
|
|
|
type Invite struct {
|
|
bun.BaseModel `bun:"table:user_invite"`
|
|
|
|
Identifiable
|
|
TimeAuditable
|
|
OrgID string `bun:"org_id,type:text,notnull" json:"orgId"`
|
|
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"`
|
|
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"`
|
|
Identifiable
|
|
Token string `bun:"token,type:text,notnull" json:"token"`
|
|
UserID string `bun:"user_id,type:text,notnull" json:"userId"`
|
|
}
|