Update Member
This commit is contained in:
@@ -5,15 +5,28 @@ import (
|
||||
)
|
||||
|
||||
type CustomerDB struct {
|
||||
ID int64 `gorm:"primaryKey;column:id"`
|
||||
Name string `gorm:"column:name"`
|
||||
Email string `gorm:"column:email"`
|
||||
Phone string `gorm:"column:phone"`
|
||||
Points int `gorm:"column:points"`
|
||||
CreatedAt time.Time `gorm:"column:created_at"`
|
||||
UpdatedAt time.Time `gorm:"column:updated_at"`
|
||||
ID int64 `gorm:"primaryKey;column:id"`
|
||||
Name string `gorm:"column:name"`
|
||||
Email string `gorm:"column:email"`
|
||||
Phone string `gorm:"column:phone"`
|
||||
Points int `gorm:"column:points"`
|
||||
CreatedAt time.Time `gorm:"column:created_at"`
|
||||
UpdatedAt time.Time `gorm:"column:updated_at"`
|
||||
CustomerID string `gorm:"column:customer_id"`
|
||||
BirthDate time.Time `gorm:"column:birth_date"`
|
||||
}
|
||||
|
||||
func (CustomerDB) TableName() string {
|
||||
return "customers"
|
||||
}
|
||||
|
||||
type PartnerMemberSequence struct {
|
||||
ID int64 `gorm:"column:id;primary_key;auto_increment"`
|
||||
PartnerID int64 `gorm:"column:partner_id;not null;index:idx_partner_month,unique"`
|
||||
LastSequence int64 `gorm:"column:last_sequence;not null;default:0"`
|
||||
UpdatedAt time.Time `gorm:"column:updated_at;not null"`
|
||||
}
|
||||
|
||||
func (PartnerMemberSequence) TableName() string {
|
||||
return "partner_member_sequences"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type MemberRegistrationDB struct {
|
||||
ID string `gorm:"column:id;primary_key"`
|
||||
Token string `gorm:"column:token;unique_index"`
|
||||
Name string `gorm:"column:name"`
|
||||
Email string `gorm:"column:email"`
|
||||
Phone string `gorm:"column:phone"`
|
||||
BirthDate time.Time `gorm:"column:birth_date"`
|
||||
OTP string `gorm:"column:otp"`
|
||||
Status string `gorm:"column:status"`
|
||||
ExpiresAt time.Time `gorm:"column:expires_at"`
|
||||
CreatedAt time.Time `gorm:"column:created_at"`
|
||||
UpdatedAt time.Time `gorm:"column:updated_at"`
|
||||
BranchID int64 `gorm:"column:branch_id"`
|
||||
CashierID int64 `gorm:"column:cashier_id"`
|
||||
}
|
||||
|
||||
func (MemberRegistrationDB) TableName() string {
|
||||
return "member_registrations"
|
||||
}
|
||||
Reference in New Issue
Block a user