Skip to content

Commit

Permalink
[EdgeDB] Create Location schema (#2934)
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanjnelson authored Nov 10, 2023
1 parent 335626b commit 37dabc1
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions dbschema/location.esdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
module default {
type Location extending Resource, Mixin::Named {
overloaded name {
constraint exclusive;
}
required type: Location::Type;

isoAlpha3: Location::IsoAlpha3Code {
constraint exclusive;
};

#TODO - links
#fundingAccount: FundingAccount;
#defaultFieldRegion: FieldRegion;
#mapImage: File;
}
}

module Location {
scalar type Type extending enum<
Country,
City,
County,
Region,
State,
CrossBorderArea
>;

scalar type IsoAlpha3Code extending str {
constraint regexp(r'^[A-Z]{3}$');
}
}

0 comments on commit 37dabc1

Please sign in to comment.