How to create the page that allow enter list of integer in one field

I am creating my own Riichi Mahjong App, and one thing got involved is call uma, and postgres is the only database that allow store that field as list of integer, which makes my schema looks like following:

...
model GameRule {
  id                    Int                   @id @default(autoincrement())
  gameType              GameType              @map("game_type")
  name                  String                @map("game_rule_name") @db.VarChar(255)
  startingScore         Int                   @map("starting_score")
  notenPenalty          Int                   @map("noten_penalty")
  honbaSize             Int                   @map("honba_size")
  tiebreaker            Tiebreaker
  uma0Over              Int[]                 @map("uma_0_over")
  uma1Over              Int[]                 @map("uma_1_over")
  uma2Over              Int[]                 @map("uma_2_over")
  uma3Over              Int[]                 @map("uma_3_over")
  oka                   Int
  chomboPenalty         Int                   @map("chombo_penalty")
  multiRonEnable        Boolean               @map("is_multi_ron_enable")
  kiriageManganEnable   Boolean               @map("is_kiriage_mangan_enable")
  multiYakumanEnable    Boolean               @map("is_multi_yakuman_enable")
  stackYakumanEnable    Boolean               @map("is_stack_yakuman_enable")
  riichiStickResolution RiichiStickResolution @map("riichi_stick_resolution")
  createdAt             DateTime?             @default(now()) @map("create_time") @db.Timestamp(0)
  updatedAt             DateTime?             @default(now()) @updatedAt @map("update_time") @db.Timestamp(0)
  Game                  Game[]

  @@map("game_rule")
}
...

I need to set all 4 uma fields because based on the rule it actually different values, for example

I just try to test via graphql using following:

mutation CreateGameRule($gameRuleInput:CreateGameRuleInput!){
  createGameRule(input: $gameRuleInput){
    id
    name
    gameType
    startingScore
    notenPenalty
    honbaSize
    uma0Over
    oka
    riichiStickResolution
    tiebreaker
    chomboPenalty
    kiriageManganEnable
    multiRonEnable
    multiYakumanEnable
    stackYakumanEnable
    
  }
}

and with the variable input:

{
   "gameRuleInput":{
      "name":"Saikouisenn Rule",
      "gameType":"YONMA",
      "startingScore":30000,
      "notenPenalty":3000,
      "honbaSize":300,
      "uma0Over":[
         30,
         10,
         -10,
         30
      ],
      "uma1Over":[
         0,
         0,
         0,
         0
      ],
      "uma2Over":[
         0,
         0,
         0,
         0
      ],
      "uma3Over":[
         0,
         0,
         0,
         0
      ],
      "oka":0,
      "chomboPenalty":30,
      "riichiStickResolution":"LOST_FOREVER",
      "tiebreaker":"DIVIDE_EQUALLY",
      "kiriageManganEnable":true,
      "multiRonEnable":false,
      "multiYakumanEnable":false,
      "stackYakumanEnable":true
   }
}

That is totally fine, so the only problem left will be the page.

After I run the yarn rw scaffold gameRule, everything looks OK except that 4 uma fields cause the problems… by default I only can enter a single number in there instead of array… how do I change this?

@vincentz in CreateGameRuleInput have you tried to make it so that each of your umaXOver field would be: umaXOver: [Int!]! ?
This should make your graphql call allright (this is the problem, right?).

Another way would be to use a gql scalar field for these.

image
Is it possible to make it something like this in the create/edit format?

In the picture it miss 1st place because the config on that website will add it automatically and make sure it equals to 0… I think I also can make it same? but how…

E.g. uma 0 over means 4人沈み… uma 1 over means 3人沈み, uma 2 over means 2人沈み, uma 3 over means 1人沈み

It looks like scaffold style cannot make the 2D table input like I paste above?

Since no one answer this I use another way to do it but facing a new problem… I open a new thread for that… so this thread I think it can close now