1
0
This commit is contained in:
2023-04-13 16:50:11 +09:00
parent ab66b9efc0
commit d72f710aaa
20 changed files with 526 additions and 63 deletions

View File

@ -45,6 +45,11 @@ func (Card) Fields() []ent.Field {
if card == 15 {
card = 1
}
// 2023/04/13 premium card id:16
if card == 16 {
card = 1
}
return card
}).
Optional(),

View File

@ -31,19 +31,19 @@ func (User) Fields() []ent.Field {
field.String("username").
NotEmpty().
Immutable().
MaxLen(30).
MaxLen(100).
//Match(regexp.MustCompile("[a-z]+$")).
Unique(),
field.String("did").
Optional().
Immutable(),
field.String("password").
NotEmpty().
Immutable().
Sensitive(),
//field.Bool("limit").
//Optional().
//Default(false),
field.Time("created_at").
Immutable().
Optional().