15 lines
287 B
Go
15 lines
287 B
Go
package utils
|
|
|
|
import (
|
|
"enaklo-pos-be/internal/common/mycontext"
|
|
"fmt"
|
|
"time"
|
|
)
|
|
|
|
func GenerateMemberID(ctx mycontext.Context, branchID, sequence int64) string {
|
|
now := time.Now()
|
|
yearMonth := now.Format("200601")
|
|
|
|
return fmt.Sprintf("%s%04d%04d", yearMonth, branchID, sequence)
|
|
}
|