Skip to content

Commit

Permalink
Merge pull request #57 from ArvidWedtstein/dev
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
ArvidWedtstein authored Mar 5, 2023
2 parents b4b06d5 + 1e340db commit 4a63c47
Show file tree
Hide file tree
Showing 103 changed files with 108,633 additions and 20,657 deletions.
136 changes: 118 additions & 18 deletions api/db/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ model TimelineBasespot {
endDate DateTime? @db.Timestamptz(6)
basespot_id BigInt?
tribeName String
map String?
map BigInt?
server String?
region String?
season String?
Expand All @@ -29,24 +29,26 @@ model TimelineBasespot {
raidcomment String?
basespot Basespot? @relation(fields: [basespot_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
Profile Profile? @relation(fields: [created_by], references: [id], onDelete: NoAction, onUpdate: NoAction)
Map Map? @relation(fields: [map], references: [id], onDelete: NoAction, onUpdate: NoAction)
timeline Timeline @relation(fields: [timeline_id], references: [id], onDelete: NoAction, onUpdate: NoAction)
}

model Basespot {
id BigInt @id(map: "basespot_pkey") @default(autoincrement())
name String
description String
latitude Float
longitude Float
image String?
created_at DateTime? @default(now()) @db.Timestamptz(6)
Map String @default("TheIsland")
estimatedForPlayers String? @default("0")
defenseImages String?
created_by String? @db.Uuid
turretsetup_image String?
updated_at DateTime? @db.Timestamptz(6)
TimelineBasespot TimelineBasespot[]
id BigInt @id(map: "basespot_pkey") @default(autoincrement())
name String
description String
latitude Float
longitude Float
image String?
created_at DateTime? @default(now()) @db.Timestamptz(6)
Map BigInt
estimatedForPlayers String? @default("0")
defenseImages String?
created_by String? @db.Uuid
turretsetup_image String?
updated_at DateTime? @db.Timestamptz(6)
Map_Basespot_MapToMap Map @relation("Basespot_MapToMap", fields: [Map], references: [id], onDelete: NoAction, onUpdate: NoAction)
TimelineBasespot TimelineBasespot[]
}

model Profile {
Expand All @@ -68,15 +70,15 @@ model Profile {
}

model Role {
id String @id(map: "roles_pkey") @default(dbgenerated("uuid_generate_v4()")) @db.Uuid
id String @id(map: "roles_pkey") @default(dbgenerated("extensions.uuid_generate_v4()")) @db.Uuid
name String
createdBy String? @default(dbgenerated("auth.uid()")) @db.Uuid
permissions permission[]
profile_profile_role_idTorole Profile[] @relation("profile_role_idTorole")
}

model Timeline {
id String @id(map: "timeline_pkey") @unique(map: "timeline_id_key") @default(dbgenerated("uuid_generate_v4()")) @db.Uuid
id String @id(map: "timeline_pkey") @unique(map: "timeline_id_key") @default(dbgenerated("extensions.uuid_generate_v4()")) @db.Uuid
createdAt DateTime? @default(now()) @db.Timestamptz(6)
updatedAt DateTime? @db.Timestamptz(6)
createdBy String @db.Uuid
Expand All @@ -96,13 +98,111 @@ model Tribe {
}

model Message {
id String @id @default(dbgenerated("uuid_generate_v4()")) @db.Uuid
id String @id @default(dbgenerated("extensions.uuid_generate_v4()")) @db.Uuid
profile_id String @default(dbgenerated("auth.uid()")) @db.Uuid
content String
created_at DateTime? @default(dbgenerated("timezone('utc'::text, now())")) @db.Timestamptz(6)
Profile Profile @relation(fields: [profile_id], references: [id], onDelete: Cascade, onUpdate: NoAction)
}

model Dino {
id String @id @default(dbgenerated("extensions.uuid_generate_v4()")) @db.Uuid
created_at DateTime? @default(now()) @db.Timestamptz(6)
name String
synonyms String[]
description String?
taming_notice String?
can_destroy String[]
immobilized_by String[]
base_stats Json?
gather_eff Json?
exp_per_kill Float? @default(0)
fits_through String[]
egg_min Float? @default(0)
egg_max Float? @default(0)
tdps Float? @default(0)
eats String[]
maturation_time String? @default("0")
weight_reduction Json?
incubation_time Float? @default(0)
affinity_needed Float? @default(0)
aff_inc Float? @default(0)
flee_threshold Float? @default(0)
hitboxes Json?
drops String[]
food_consumption_base Float? @default(0)
food_consumption_mult Float? @default(0)
disable_ko Boolean? @default(false)
violent_tame Boolean? @default(false)
taming_bonus_attr Float? @default(0)
disable_food Boolean? @default(false)
disable_mult Boolean? @default(false)
water_movement Boolean? @default(true)
admin_note String?
base_points Float?
method String[]
knockout String[]
non_violent_food_affinity_mult Float?
non_violent_food_rate_mult Float?
taming_interval Float?
base_taming_time Float?
exp_per_kill_adj Float?
disable_tame Boolean? @default(false)
x_variant Boolean? @default(false)
attack Json?
mounted_weaponry Boolean? @default(false)
ridable Boolean? @default(false)
flyer_dino Boolean? @default(false)
water_dino Boolean? @default(false)
}

model Item {
id BigInt @id(map: "Items_pkey") @default(autoincrement())
created_at DateTime? @default(now()) @db.Timestamptz(6)
name String
description String?
image String?
max_stack Float?
weight Float? @default(0)
engram_points Float? @default(0)
crafting_time Float? @default(0)
req_level BigInt? @default(0)
yields Float? @default(1)
recipe Json?
stats Json?
color String? @default("#ff0000")
crafted_in String[]
effects String[]
type String @default("Other")
@@index([stats(ops: JsonbPathOps)], map: "idxginp", type: Gin)
}

model Map {
id BigInt @id @default(autoincrement())
created_at DateTime? @default(now()) @db.Timestamptz(6)
name String?
loot_crates Json?
oil_veins Json?
water_veins Json?
wyvern_nests Json?
ice_wyvern_nests Json?
gas_veins Json?
deinonychus_nests Json?
charge_nodes Json?
plant_z_nodes Json?
drake_nests Json?
glitches Json?
magmasaur_nests Json?
poison_trees Json?
mutagen_bulbs Json?
carniflora Json?
notes Json?
img String?
Basespot_Basespot_MapToMap Basespot[] @relation("Basespot_MapToMap")
TimelineBasespot TimelineBasespot[]
}

enum permission {
basespot_delete @map("basespot:delete")
basespot_create @map("basespot:create")
Expand Down
7 changes: 4 additions & 3 deletions api/src/graphql/basespots.sdl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ export const schema = gql`
longitude: Float!
image: String
created_at: DateTime
Map: String!
Map: BigInt!
estimatedForPlayers: String
defenseImages: String
created_by: String
turretsetup_image: String
updated_at: DateTime
Map_Basespot_MapToMap: Map!
TimelineBasespot: [TimelineBasespot]!
}
Expand All @@ -34,7 +35,7 @@ export const schema = gql`
longitude: Float!
image: String
created_at: DateTime
Map: String!
Map: BigInt!
estimatedForPlayers: String
defenseImages: String
created_by: String
Expand All @@ -49,7 +50,7 @@ export const schema = gql`
longitude: Float
image: String
created_at: DateTime
Map: String
Map: BigInt
estimatedForPlayers: String
defenseImages: String
created_by: String
Expand Down
148 changes: 148 additions & 0 deletions api/src/graphql/dinos.sdl.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
export const schema = gql`
type Dino {
id: String!
created_at: DateTime
name: String!
synonyms: [String]!
description: String
taming_notice: String
can_destroy: [String]!
immobilized_by: [String]!
base_stats: JSON
gather_eff: JSON
exp_per_kill: Float
fits_through: [String]!
egg_min: Float
egg_max: Float
tdps: Float
eats: [String]!
maturation_time: String
weight_reduction: JSON
incubation_time: Float
affinity_needed: Float
aff_inc: Float
flee_threshold: Float
hitboxes: JSON
drops: [String]!
food_consumption_base: Float
food_consumption_mult: Float
disable_ko: Boolean
violent_tame: Boolean
taming_bonus_attr: Float
disable_food: Boolean
disable_mult: Boolean
water_movement: Boolean
admin_note: String
base_points: Float
method: [String]!
knockout: [String]!
non_violent_food_affinity_mult: Float
non_violent_food_rate_mult: Float
taming_interval: Float
base_taming_time: Float
exp_per_kill_adj: Float
disable_tame: Boolean
x_variant: Boolean
}
type Query {
dinos: [Dino!]! @requireAuth
dino(id: String!): Dino @requireAuth
}
input CreateDinoInput {
created_at: DateTime
name: String!
synonyms: [String]!
description: String
taming_notice: String
can_destroy: [String]!
immobilized_by: [String]!
base_stats: JSON
gather_eff: JSON
exp_per_kill: Float
fits_through: [String]!
egg_min: Float
egg_max: Float
tdps: Float
eats: [String]!
maturation_time: String
weight_reduction: JSON
incubation_time: Float
affinity_needed: Float
aff_inc: Float
flee_threshold: Float
hitboxes: JSON
drops: [String]!
food_consumption_base: Float
food_consumption_mult: Float
disable_ko: Boolean
violent_tame: Boolean
taming_bonus_attr: Float
disable_food: Boolean
disable_mult: Boolean
water_movement: Boolean
admin_note: String
base_points: Float
method: [String]!
knockout: [String]!
non_violent_food_affinity_mult: Float
non_violent_food_rate_mult: Float
taming_interval: Float
base_taming_time: Float
exp_per_kill_adj: Float
disable_tame: Boolean
x_variant: Boolean
}
input UpdateDinoInput {
created_at: DateTime
name: String
synonyms: [String]!
description: String
taming_notice: String
can_destroy: [String]!
immobilized_by: [String]!
base_stats: JSON
gather_eff: JSON
exp_per_kill: Float
fits_through: [String]!
egg_min: Float
egg_max: Float
tdps: Float
eats: [String]!
maturation_time: String
weight_reduction: JSON
incubation_time: Float
affinity_needed: Float
aff_inc: Float
flee_threshold: Float
hitboxes: JSON
drops: [String]!
food_consumption_base: Float
food_consumption_mult: Float
disable_ko: Boolean
violent_tame: Boolean
taming_bonus_attr: Float
disable_food: Boolean
disable_mult: Boolean
water_movement: Boolean
admin_note: String
base_points: Float
method: [String]!
knockout: [String]!
non_violent_food_affinity_mult: Float
non_violent_food_rate_mult: Float
taming_interval: Float
base_taming_time: Float
exp_per_kill_adj: Float
disable_tame: Boolean
x_variant: Boolean
}
type Mutation {
createDino(input: CreateDinoInput!): Dino! @requireAuth
updateDino(id: String!, input: UpdateDinoInput!): Dino! @requireAuth
deleteDino(id: String!): Dino! @requireAuth
}
`
Loading

0 comments on commit 4a63c47

Please sign in to comment.