update cp
This commit is contained in:
parent
311f1ae71a
commit
ab66b9efc0
@ -59,7 +59,7 @@ var (
|
||||
{Name: "password", Type: field.TypeString},
|
||||
{Name: "created_at", Type: field.TypeTime, Nullable: true},
|
||||
{Name: "updated_at", Type: field.TypeTime, Nullable: true},
|
||||
{Name: "next", Type: field.TypeString, Nullable: true, Default: "20230409"},
|
||||
{Name: "next", Type: field.TypeString, Nullable: true, Default: "20230410"},
|
||||
{Name: "group_users", Type: field.TypeInt, Nullable: true},
|
||||
}
|
||||
// UsersTable holds the schema information for the "users" table.
|
||||
|
@ -36,14 +36,15 @@ func (Card) Fields() []ent.Field {
|
||||
} else {
|
||||
card = 0
|
||||
}
|
||||
|
||||
if card == 13 {
|
||||
card = 14
|
||||
card = 1
|
||||
}
|
||||
|
||||
// 2023/04/09 premium card id:15
|
||||
//if card == 15 {
|
||||
// card = 1
|
||||
//}
|
||||
card = 15
|
||||
if card == 15 {
|
||||
card = 1
|
||||
}
|
||||
return card
|
||||
}).
|
||||
Optional(),
|
||||
@ -71,13 +72,13 @@ func (Card) Fields() []ent.Field {
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
var cp = 1 + rand.Intn(100)
|
||||
if cp == 2 {
|
||||
cp = 50 + rand.Intn(100)
|
||||
cp = 50 + rand.Intn(150)
|
||||
}
|
||||
if card >= 1 {
|
||||
cp = 50 + cp + rand.Intn(200)
|
||||
cp = 150 + cp + rand.Intn(300)
|
||||
}
|
||||
if super == "super" {
|
||||
cp = 200 + cp + rand.Intn(300)
|
||||
cp = 300 + cp + rand.Intn(500)
|
||||
}
|
||||
|
||||
return cp
|
||||
|
Loading…
Reference in New Issue
Block a user