Replace gorm.io/gen header with gormcol
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
|
||||
package dbmodel
|
||||
|
||||
import (
|
||||
"git.ma-al.com/goc_marek/gormcol"
|
||||
"time"
|
||||
)
|
||||
|
||||
const TableNameB2bRefreshToken = "b2b_refresh_tokens"
|
||||
|
||||
// B2bRefreshToken mapped from table <b2b_refresh_tokens>
|
||||
type B2bRefreshToken struct {
|
||||
ID int32 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
|
||||
CustomerID int64 `gorm:"column:customer_id;not null;index:idx_b2b_refresh_tokens_customer_id,priority:1;index:idx_refresh_tokens_customer_id,priority:1" json:"customer_id"`
|
||||
TokenHash string `gorm:"column:token_hash;not null;uniqueIndex:idx_b2b_refresh_tokens_token_hash,priority:1" json:"token_hash"`
|
||||
ExpiresAt time.Time `gorm:"column:expires_at;not null" json:"expires_at"`
|
||||
CreatedAt *time.Time `gorm:"column:created_at" json:"created_at"`
|
||||
}
|
||||
|
||||
// TableName B2bRefreshToken's table name
|
||||
func (*B2bRefreshToken) TableName() string {
|
||||
return TableNameB2bRefreshToken
|
||||
}
|
||||
|
||||
var B2bRefreshTokenCols = struct {
|
||||
ID gormcol.Field
|
||||
CustomerID gormcol.Field
|
||||
TokenHash gormcol.Field
|
||||
ExpiresAt gormcol.Field
|
||||
CreatedAt gormcol.Field
|
||||
}{
|
||||
ID: gormcol.Field{}.Set((&B2bRefreshToken{}).TableName(), "id"),
|
||||
CustomerID: gormcol.Field{}.Set((&B2bRefreshToken{}).TableName(), "customer_id"),
|
||||
TokenHash: gormcol.Field{}.Set((&B2bRefreshToken{}).TableName(), "token_hash"),
|
||||
ExpiresAt: gormcol.Field{}.Set((&B2bRefreshToken{}).TableName(), "expires_at"),
|
||||
CreatedAt: gormcol.Field{}.Set((&B2bRefreshToken{}).TableName(), "created_at"),
|
||||
}
|
||||
Reference in New Issue
Block a user