graphql-engine/server/lib/dc-api/test/Test/Data/schema-tables.json

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

716 lines
18 KiB
JSON
Raw Normal View History

[
{
"name": ["Artist"],
"type": "table",
"primary_key": ["ArtistId"],
"description": "Collection of artists of music",
"columns": [
{
"name": "ArtistId",
"type": "number",
"nullable": false,
"description": "Artist primary key identifier",
"insertable": true,
"updatable": false
},
{
"name": "Name",
"type": "string",
"nullable": true,
"description": "The name of the artist",
"insertable": true,
"updatable": true
}
],
"insertable": true,
"updatable": true,
"deletable": true
},
{
"name": ["Album"],
"type": "table",
"primary_key": ["AlbumId"],
"foreign_keys": {
"Artist": {
"column_mapping": {
"ArtistId": "ArtistId"
},
"foreign_table": ["Artist"]
}
},
"description": "Collection of music albums created by artists",
"columns": [
{
"name": "AlbumId",
"type": "number",
"nullable": false,
"description": "Album primary key identifier",
"insertable": true,
"updatable": false
},
{
"name": "Title",
"type": "string",
"nullable": false,
"description": "The title of the album",
"insertable": true,
"updatable": true
},
{
"name": "ArtistId",
"type": "number",
"nullable": false,
"description": "The ID of the artist that created this album",
"insertable": true,
"updatable": true
}
],
"insertable": true,
"updatable": true,
"deletable": true
},
{
"name": ["Customer"],
"type": "table",
"primary_key": ["CustomerId"],
"foreign_keys": {
"CustomerSupportRep": {
"column_mapping": {
"SupportRepId": "EmployeeId"
},
"foreign_table": ["Employee"]
}
},
"description": "Collection of customers who can buy tracks",
"columns": [
{
"name": "CustomerId",
"type": "number",
"nullable": false,
"description": "Customer primary key identifier",
"insertable": true,
"updatable": false
},
{
"name": "FirstName",
"type": "string",
"nullable": false,
"description": "The customer's first name",
"insertable": true,
"updatable": true
},
{
"name": "LastName",
"type": "string",
"nullable": false,
"description": "The customer's last name",
"insertable": true,
"updatable": true
},
{
"name": "Company",
"type": "string",
"nullable": true,
"description": "The customer's company name",
"insertable": true,
"updatable": true
},
{
"name": "Address",
"type": "string",
"nullable": true,
"description": "The customer's address line (street number, street)",
"insertable": true,
"updatable": true
},
{
"name": "City",
"type": "string",
"nullable": true,
"description": "The customer's address city",
"insertable": true,
"updatable": true
},
{
"name": "State",
"type": "string",
"nullable": true,
"description": "The customer's address state",
"insertable": true,
"updatable": true
},
{
"name": "Country",
"type": "string",
"nullable": true,
"description": "The customer's address country",
"insertable": true,
"updatable": true
},
{
"name": "PostalCode",
"type": "string",
"nullable": true,
"description": "The customer's address postal code",
"insertable": true,
"updatable": true
},
{
"name": "Phone",
"type": "string",
"nullable": true,
"description": "The customer's phone number",
"insertable": true,
"updatable": true
},
{
"name": "Fax",
"type": "string",
"nullable": true,
"description": "The customer's fax number",
"insertable": true,
"updatable": true
},
{
"name": "Email",
"type": "string",
"nullable": false,
"description": "The customer's email address",
"insertable": true,
"updatable": true
},
{
"name": "SupportRepId",
"type": "number",
"nullable": true,
"description": "The ID of the Employee who is this customer's support representative",
"insertable": true,
"updatable": true
}
],
"insertable": true,
"updatable": true,
"deletable": true
},
{
"name": ["Employee"],
"type": "table",
"primary_key": ["EmployeeId"],
"foreign_keys": {
"EmployeeReportsTo": {
"column_mapping": {
"ReportsTo": "EmployeeId"
},
"foreign_table": ["Employee"]
}
},
"description": "Collection of employees who work for the business",
"columns": [
{
"name": "EmployeeId",
"type": "number",
"nullable": false,
"description": "Employee primary key identifier",
"insertable": true,
"updatable": false
},
{
"name": "LastName",
"type": "string",
"nullable": false,
"description": "The employee's last name",
"insertable": true,
"updatable": true
},
{
"name": "FirstName",
"type": "string",
"nullable": false,
"description": "The employee's first name",
"insertable": true,
"updatable": true
},
{
"name": "Title",
"type": "string",
"nullable": true,
"description": "The employee's job title",
"insertable": true,
"updatable": true
},
{
"name": "ReportsTo",
"type": "number",
"nullable": true,
"description": "The employee's manager",
"insertable": true,
"updatable": true
},
{
"name": "BirthDate",
"type": "DateTime",
"nullable": true,
"description": "The employee's birth date",
"insertable": true,
"updatable": true
},
{
"name": "HireDate",
"type": "DateTime",
"nullable": true,
"description": "The employee's hire date",
"insertable": true,
"updatable": true
},
{
"name": "Address",
"type": "string",
"nullable": true,
"description": "The employee's address line (street number, street)",
"insertable": true,
"updatable": true
},
{
"name": "City",
"type": "string",
"nullable": true,
"description": "The employee's address city",
"insertable": true,
"updatable": true
},
{
"name": "State",
"type": "string",
"nullable": true,
"description": "The employee's address state",
"insertable": true,
"updatable": true
},
{
"name": "Country",
"type": "string",
"nullable": true,
"description": "The employee's address country",
"insertable": true,
"updatable": true
},
{
"name": "PostalCode",
"type": "string",
"nullable": true,
"description": "The employee's address postal code",
"insertable": true,
"updatable": true
},
{
"name": "Phone",
"type": "string",
"nullable": true,
"description": "The employee's phone number",
"insertable": true,
"updatable": true
},
{
"name": "Fax",
"type": "string",
"nullable": true,
"description": "The employee's fax number",
"insertable": true,
"updatable": true
},
{
"name": "Email",
"type": "string",
"nullable": true,
"description": "The employee's email address",
"insertable": true,
"updatable": true
}
],
"insertable": true,
"updatable": true,
"deletable": true
},
{
"name": ["Genre"],
"type": "table",
"primary_key": ["GenreId"],
"description": "Genres of music",
"columns": [
{
"name": "GenreId",
"type": "number",
"nullable": false,
"description": "Genre primary key identifier",
"insertable": true,
"updatable": false
},
{
"name": "Name",
"type": "string",
"nullable": true,
"description": "The name of the genre",
"insertable": true,
"updatable": true
}
],
"insertable": true,
"updatable": true,
"deletable": true
},
{
"name": ["Invoice"],
"type": "table",
"primary_key": ["InvoiceId"],
"foreign_keys": {
"InvoiceCustomer": {
"column_mapping": {
"CustomerId": "CustomerId"
},
"foreign_table": ["Customer"]
}
},
"description": "Collection of invoices of music purchases by a customer",
"columns": [
{
"name": "InvoiceId",
"type": "number",
"nullable": false,
"description": "Invoice primary key identifier",
"insertable": true,
"updatable": false
},
{
"name": "CustomerId",
"type": "number",
"nullable": false,
"description": "ID of the customer who bought the music",
"insertable": true,
"updatable": true
},
{
"name": "InvoiceDate",
"type": "DateTime",
"nullable": false,
"description": "Date of the invoice",
"insertable": true,
"updatable": true
},
{
"name": "BillingAddress",
"type": "string",
"nullable": true,
"description": "The invoice's billing address line (street number, street)",
"insertable": true,
"updatable": true
},
{
"name": "BillingCity",
"type": "string",
"nullable": true,
"description": "The invoice's billing address city",
"insertable": true,
"updatable": true
},
{
"name": "BillingState",
"type": "string",
"nullable": true,
"description": "The invoice's billing address state",
"insertable": true,
"updatable": true
},
{
"name": "BillingCountry",
"type": "string",
"nullable": true,
"description": "The invoice's billing address country",
"insertable": true,
"updatable": true
},
{
"name": "BillingPostalCode",
"type": "string",
"nullable": true,
"description": "The invoice's billing address postal code",
"insertable": true,
"updatable": true
},
{
"name": "Total",
"type": "number",
"nullable": false,
"description": "The total amount due on the invoice",
"insertable": true,
"updatable": true
}
],
"insertable": true,
"updatable": true,
"deletable": true
},
{
"name": ["InvoiceLine"],
"type": "table",
"primary_key": ["InvoiceLineId"],
"foreign_keys": {
"Invoice": {
"column_mapping": {
"InvoiceId": "InvoiceId"
},
"foreign_table": ["Invoice"]
},
"Track": {
"column_mapping": {
"TrackId": "TrackId"
},
"foreign_table": ["Track"]
}
},
"description": "Collection of track purchasing line items of invoices",
"columns": [
{
"name": "InvoiceLineId",
"type": "number",
"nullable": false,
"description": "Invoice Line primary key identifier",
"insertable": true,
"updatable": false
},
{
"name": "InvoiceId",
"type": "number",
"nullable": false,
"description": "ID of the invoice the line belongs to",
"insertable": true,
"updatable": true
},
{
"name": "TrackId",
"type": "number",
"nullable": false,
"description": "ID of the music track being purchased",
"insertable": true,
"updatable": true
},
{
"name": "UnitPrice",
"type": "number",
"nullable": false,
"description": "Price of each individual track unit",
"insertable": true,
"updatable": true
},
{
"name": "Quantity",
"type": "number",
"nullable": false,
"description": "Quantity of the track purchased",
"insertable": true,
"updatable": true
}
],
"insertable": true,
"updatable": true,
"deletable": true
},
{
"name": ["MediaType"],
"type": "table",
"primary_key": ["MediaTypeId"],
"description": "Collection of media types that tracks can be encoded in",
"columns": [
{
"name": "MediaTypeId",
"type": "number",
"nullable": false,
"description": "Media Type primary key identifier",
"insertable": true,
"updatable": false
},
{
"name": "Name",
"type": "string",
"nullable": true,
"description": "The name of the media type format",
"insertable": true,
"updatable": true
}
],
"insertable": true,
"updatable": true,
"deletable": true
},
{
"name": ["Playlist"],
"type": "table",
"primary_key": ["PlaylistId"],
"description": "Collection of playlists",
"columns": [
{
"name": "PlaylistId",
"type": "number",
"nullable": false,
"description": "Playlist primary key identifier",
"insertable": true,
"updatable": false
},
{
"name": "Name",
"type": "string",
"nullable": true,
"description": "The name of the playlist",
"insertable": true,
"updatable": true
}
],
"insertable": true,
"updatable": true,
"deletable": true
},
{
"name": ["PlaylistTrack"],
"type": "table",
"primary_key": ["PlaylistId", "TrackId"],
"foreign_keys": {
"Playlist": {
"column_mapping": {
"PlaylistId": "PlaylistId"
},
"foreign_table": ["Playlist"]
},
"Track": {
"column_mapping": {
"TrackId": "TrackId"
},
"foreign_table": ["Track"]
}
},
"description": "Associations between playlists and tracks",
"columns": [
{
"name": "PlaylistId",
"type": "number",
"nullable": false,
"description": "The ID of the playlist",
"insertable": true,
"updatable": false
},
{
"name": "TrackId",
"type": "number",
"nullable": false,
"description": "The ID of the track",
"insertable": true,
"updatable": false
}
],
"insertable": true,
"updatable": true,
"deletable": true
},
{
"name": ["Track"],
"type": "table",
"primary_key": ["TrackId"],
"foreign_keys": {
"Album": {
"column_mapping": {
"AlbumId": "AlbumId"
},
"foreign_table": ["Album"]
},
"Genre": {
"column_mapping": {
"GenreId": "GenreId"
},
"foreign_table": ["Genre"]
},
"MediaType": {
"column_mapping": {
"MediaTypeId": "MediaTypeId"
},
"foreign_table": ["MediaType"]
}
},
"description": "Collection of music tracks",
"columns": [
{
"name": "TrackId",
"type": "number",
"nullable": false,
"description": "The ID of the track",
"insertable": true,
"updatable": false
},
{
"name": "Name",
"type": "string",
"nullable": false,
"description": "The name of the track",
"insertable": true,
"updatable": true
},
{
"name": "AlbumId",
"type": "number",
"nullable": true,
"description": "The ID of the album the track belongs to",
"insertable": true,
"updatable": true
},
{
"name": "MediaTypeId",
"type": "number",
"nullable": false,
"description": "The ID of the media type the track is encoded with",
"insertable": true,
"updatable": true
},
{
"name": "GenreId",
"type": "number",
"nullable": true,
"description": "The ID of the genre of the track",
"insertable": true,
"updatable": true
},
{
"name": "Composer",
"type": "string",
"nullable": true,
"description": "The name of the composer of the track",
"insertable": true,
"updatable": true
},
{
"name": "Milliseconds",
"type": "number",
"nullable": false,
"description": "The length of the track in milliseconds",
"insertable": true,
"updatable": true
},
{
"name": "Bytes",
"type": "number",
"nullable": true,
"description": "The size of the track in bytes",
"insertable": true,
"updatable": true
},
{
"name": "UnitPrice",
"type": "number",
"nullable": false,
"description": "The price of the track",
"insertable": true,
"updatable": true
}
],
"insertable": true,
"updatable": true,
"deletable": true
}
]