17 lines
520 B
V
17 lines
520 B
V
module main
|
|
|
|
@[table: 'planes']
|
|
pub struct Plane {
|
|
mut:
|
|
id int @[primary; sql: serial]
|
|
from string @[sql_type: 'TEXT']
|
|
to string @[sql_type: 'TEXT']
|
|
seats string @[sql_type: 'TEXT']
|
|
seats_available int @[sql_type: 'INT']
|
|
time string @[sql_type: 'TEXT']
|
|
date string @[sql_type: 'TEXT']
|
|
price int @[sql_type: 'INT']
|
|
status string @[sql_type: 'TEXT']
|
|
tickets []Ticket @[fkey: 'plane_id']
|
|
}
|