From cb66ba41f40ab3cc00a29b9b225bfd4ee414b1c9 Mon Sep 17 00:00:00 2001 From: RanolP Date: Sat, 2 Mar 2024 02:06:50 +0900 Subject: [PATCH] feat: migrate UserTier -> SolveTier --- src/main.tsp | 1 + src/models/SolveTier.tsp | 84 ++++++++++++++++++++++++++++++++++++++ src/models/main.tsp | 1 + src/openapi.yaml | 2 - src/schemas/user-tier.yaml | 56 ------------------------- 5 files changed, 86 insertions(+), 58 deletions(-) create mode 100644 src/models/SolveTier.tsp create mode 100644 src/models/main.tsp delete mode 100644 src/schemas/user-tier.yaml diff --git a/src/main.tsp b/src/main.tsp index fbeeb4c..97b5a6f 100644 --- a/src/main.tsp +++ b/src/main.tsp @@ -5,6 +5,7 @@ import "@typespec/openapi3"; import "@typespec/versioning"; import "./operations/main.tsp"; +import "./models/main.tsp"; using TypeSpec.Http; using TypeSpec.OpenAPI; diff --git a/src/models/SolveTier.tsp b/src/models/SolveTier.tsp new file mode 100644 index 0000000..61ae576 --- /dev/null +++ b/src/models/SolveTier.tsp @@ -0,0 +1,84 @@ +namespace SolvedAC { + /** + * Bronze V를 1, + * Bronze IV를 2, + * ..., + * Ruby I을 30, + * Master를 31로 표현하는 문제해결 티어입니다. + * 자세한 값 정보는 표1. 수치 - 이름 표를 펼쳐 참고하십시오. + * + *
+ * + * 표1. 수치 - 이름 표 + * + * + * | 수치 | 이름 | + * | ---: | ------------ | + * | 1 | Bronze V | + * | 2 | Bronze IV | + * | 3 | Bronze III | + * | 4 | Bronze II | + * | 5 | Bronze I | + * | 6 | Silver V | + * | 7 | Silver IV | + * | 8 | Silver III | + * | 9 | Silver II | + * | 10 | Silver I | + * | 11 | Gold V | + * | 12 | Gold IV | + * | 13 | Gold III | + * | 14 | Gold II | + * | 15 | Gold I | + * | 16 | Platinum V | + * | 17 | Platinum IV | + * | 18 | Platinum III | + * | 19 | Platinum II | + * | 20 | Platinum I | + * | 21 | Diamond V | + * | 22 | Diamond IV | + * | 23 | Diamond III | + * | 24 | Diamond II | + * | 25 | Diamond I | + * | 26 | Ruby V | + * | 27 | Ruby IV | + * | 28 | Ruby III | + * | 29 | Ruby II | + * | 30 | Ruby I | + * | 31 | Master | + * + *
+ */ + enum SolveTier { + Bronze5: 1, + Bronze4: 2, + Bronze3: 3, + Bronze2: 4, + Bronze1: 5, + Silver5: 6, + Silver4: 7, + Silver3: 8, + Silver2: 9, + Silver1: 10, + Gold5: 11, + Gold4: 12, + Gold3: 13, + Gold2: 14, + Gold1: 15, + Platinum5: 16, + Platinum4: 17, + Platinum3: 18, + Platinum2: 19, + Platinum1: 20, + Diamond5: 21, + Diamond4: 22, + Diamond3: 23, + Diamond2: 24, + Diamond1: 25, + Ruby5: 26, + Ruby4: 27, + Ruby3: 28, + Ruby2: 29, + Ruby1: 30, + Master: 31, + } +} diff --git a/src/models/main.tsp b/src/models/main.tsp new file mode 100644 index 0000000..b8566e3 --- /dev/null +++ b/src/models/main.tsp @@ -0,0 +1 @@ +import "./SolveTier.tsp"; diff --git a/src/openapi.yaml b/src/openapi.yaml index 151d01d..7a98bf7 100644 --- a/src/openapi.yaml +++ b/src/openapi.yaml @@ -143,5 +143,3 @@ components: $ref: "./schemas/solvedac-statistics.yaml#/components/schemas/SolvedAcStatistics" User: $ref: "./schemas/user.yaml#/components/schemas/User" - UserTier: - $ref: "./schemas/user-tier.yaml#/components/schemas/UserTier" diff --git a/src/schemas/user-tier.yaml b/src/schemas/user-tier.yaml deleted file mode 100644 index 4a862e0..0000000 --- a/src/schemas/user-tier.yaml +++ /dev/null @@ -1,56 +0,0 @@ -# yaml-language-server: $schema=https://spec.openapis.org/oas/3.1/schema/2021-05-20 ---- -# for the intellisense -openapi: "3.1.0" -info: { title: "", version: "" } - -components: - schemas: - UserTier: - title: UserTier - type: "integer" - format: "int64" - description: | - Bronze V를 1, Bronze IV를 2, ..., Ruby I을 30, Master를 31로 표현하는 사용자 티어입니다. - 자세한 값 정보는 표1. 수치 - 이름 표를 펼쳐 참고하십시오. - -
- - 표1. 수치 - 이름 표 - - - | 수치 | 이름 | - | ---: | ------------ | - | 1 | Bronze V | - | 2 | Bronze IV | - | 3 | Bronze III | - | 4 | Bronze II | - | 5 | Bronze I | - | 6 | Silver V | - | 7 | Silver IV | - | 8 | Silver III | - | 9 | Silver II | - | 10 | Silver I | - | 11 | Gold V | - | 12 | Gold IV | - | 13 | Gold III | - | 14 | Gold II | - | 15 | Gold I | - | 16 | Platinum V | - | 17 | Platinum IV | - | 18 | Platinum III | - | 19 | Platinum II | - | 20 | Platinum I | - | 21 | Diamond V | - | 22 | Diamond IV | - | 23 | Diamond III | - | 24 | Diamond II | - | 25 | Diamond I | - | 26 | Ruby V | - | 27 | Ruby IV | - | 28 | Ruby III | - | 29 | Ruby II | - | 30 | Ruby I | - | 31 | Master | - -