models:
    #-----------------------
    # Static Data
    #-----------------------
    VehicleBrand:
        name: string:40
        description: string:200
        logo: string:100
        deleted_at: timestamp nullable default:null
        relationships:
            hasMany: Vehicle

    VehicleType:
        name: string:40
        description: string:200
        image: string:100
        deleted_at: timestamp nullable default:null
        relationships:
            hasMany: Vehicle, Takings
            hasOne: Fare

    Fare:
        vehicle_type_id: id
        name: string:50
        value: decimal:8,2
        deleted_at: timestamp nullable default:null

    Workstation:
        name: string:40
        description: string:200
        printer: string:40

    DocumentType:
        letter: string:1
        name: string:20
        deleted_at: timestamp nullable default:null
        relationships:
            hasMany: Profile

    ProfileType:
        name: string:20
        slug: string:20
        description: string:200
        deleted_at: timestamp nullable default:null
        relationships:
            hasMany: Profile

    PaymentMethod:
        name: string:50
        description: string:200
        deleted_at: timestamp nullable default:null
        image: string:100
        relationships:
            hasMany: Payment

    Bank:
        code: string:4
        name: string:50
        image: string:100
        deleted_at: timestamp nullable default:null
        relationships:
            hasMany: BankAccount

    #-----------------------
    # Single Models
    #-----------------------
    Profile:
        user_id: id
        document_type_id: id
        id_card: string:12
        profile_type_id: id
        names: string:50
        surnames: string:50 nullable
        phone: string:13 nullable
        address: string:200 nullable
        relationships:
            hasMany: Vehicle

    Vehicle:
        plate: string:10
        profile_id: id
        vehicle_type_id: id
        vehicle_brand_id: id
        year: integer
        color: string:20 nullable
        deleted_at: timestamp nullable default:null
        relationships:
            belongsToMany: PrepaidCard

    PrepaidCard:
        profile_id: id
        code: string:24
        password: string:100
        balance: decimal:8,2
        exonerated: boolean default:0
        direct: boolean default:0
        status: boolean default:1
        deleted_at: timestamp nullable default:null
        relationships:
            belongsToMany: Vehicle
            hasMany: Ansapass

    Ansapass:
        code: string:30
        prepaid_card_id: id
        vehicle_id: id
        deleted_at: timestamp nullable default:null

    #-----------------------
    # Dual Models
    #-----------------------
    PrepaidSummary:
        prepaid_card_id: id
        ansapass_id: id nullable default:null
        code: string:20
        type: enum:add,out
        concept: string:100
        amount: decimal:8,2
        tax: decimal:8,2 default:0
        relationships:
            morphToMany: Payment

    Takings:
        code: string:20
        turn_id: id
        vehicle_type_id: id
        vehicle_id: id nullable
        amount: decimal:8,2
        relationships:
            morphToMany: Payment

    Payment:
        last_digits: string:10 nullable
        payment_method_id: id
        amount: decimal:8,2
        relationships:
            morphedByMany: PrepaidSummary, Takings

    Turn:
        number: integer
        profile_id: id
        workstation_id: id
        begin_at: timestamp nullable
        end_at: timestamp nullable
        relationships:
            hasMany: Takings

    BankAccount:
        number: string:20
        type: string:20
        bank_id: id
