mirror of
https://github.com/hazemKrimi/crimson-vault.git
synced 2026-05-01 18:20:27 +00:00
wip: versioned migrations using atlas
This commit is contained in:
@@ -7,8 +7,8 @@ import (
|
||||
)
|
||||
|
||||
type Client struct {
|
||||
ID string `json:"id" gorm:"primaryKey"`
|
||||
UserID string `json:"userId"`
|
||||
ID string `json:"id" gorm:"type:varchar(255);primaryKey"`
|
||||
UserID string `json:"userId" gorm:"type:varchar(255)"`
|
||||
CreatedAt time.Time `json:"createAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
DeletedAt gorm.DeletedAt `json:"deletedAt" gorm:"index"`
|
||||
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
type User struct {
|
||||
ID string `json:"id" gorm:"primaryKey"`
|
||||
ID string `json:"id" gorm:"type:varchar(255);primaryKey"`
|
||||
SessionID string `json:"-"`
|
||||
CreatedAt time.Time `json:"createAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
@@ -22,7 +22,7 @@ type User struct {
|
||||
Email string `json:"email"`
|
||||
Username string `json:"username" gorm:"unique"`
|
||||
Password string `json:"-"`
|
||||
Clients []Client `json:"clients" gorm:"constraint:OnUpdate:CASCADE,onDelete:CASCADE"`
|
||||
Clients []Client `json:"clients" gorm:"constraint:onDelete:CASCADE"`
|
||||
}
|
||||
|
||||
type CreateUserRequestBody struct {
|
||||
|
||||
Reference in New Issue
Block a user