package model

type RealNameAuth struct {
	ID                uint64 `gorm:"primaryKey;column:id" json:"id"`
	UserID            uint64 `gorm:"column:user_id;uniqueIndex" json:"user_id"`
	RealName          string `gorm:"column:real_name" json:"real_name"`
	IdentityMasked    string `gorm:"column:identity_masked" json:"identity_masked"`
	IdentityEncrypted string `gorm:"column:identity_encrypted" json:"-"`
	Status            string `gorm:"column:status;index;default:pending" json:"status"`
	SubmittedAt       int64  `gorm:"column:submitted_at" json:"submitted_at"`
	ReviewedAt        int64  `gorm:"column:reviewed_at" json:"reviewed_at"`
	RejectReason      string `gorm:"column:reject_reason" json:"reject_reason"`
	CreatedAt         int64  `gorm:"column:created_at" json:"created_at"`
	UpdatedAt         int64  `gorm:"column:updated_at" json:"updated_at"`

	User User `gorm:"foreignKey:UserID" json:"user"`
}

func (RealNameAuth) TableName() string {
	return "v2_realname_auth"
}
