Eccube\Entity\Order:
    type: entity
    table: dtb_order
    repositoryClass: Eccube\Repository\OrderRepository
    id:
        id:
            type: integer
            nullable: false
            unsigned: false
            id: true
            column: order_id
            generator:
                strategy: AUTO
    fields:
        pre_order_id:
            type: text
            nullable: true
        message:
            type: text
            nullable: true
        name01:
            type: text
            nullable: true
            column: order_name01
        name02:
            type: text
            nullable: true
            column: order_name02
        kana01:
            type: text
            nullable: true
            column: order_kana01
        kana02:
            type: text
            nullable: true
            column: order_kana02
        company_name:
            type: text
            nullable: true
            column: order_company_name
        email:
            type: text
            nullable: true
            column: order_email
        tel01:
            type: text
            nullable: true
            column: order_tel01
        tel02:
            type: text
            nullable: true
            column: order_tel02
        tel03:
            type: text
            nullable: true
            column: order_tel03
        fax01:
            type: text
            nullable: true
            column: order_fax01
        fax02:
            type: text
            nullable: true
            column: order_fax02
        fax03:
            type: text
            nullable: true
            column: order_fax03
        zip01:
            type: text
            nullable: true
            column: order_zip01
        zip02:
            type: text
            nullable: true
            column: order_zip02
        zipcode:
            type: text
            nullable: true
            column: order_zipcode
        addr01:
            type: text
            nullable: true
            column: order_addr01
        addr02:
            type: text
            nullable: true
            column: order_addr02
        birth:
            type: datetime
            nullable: true
            column: order_birth
        subtotal:
            type: decimal
            nullable: true
            precision: 10
            scale: 0
        discount:
            type: decimal
            nullable: false
            precision: 10
            scale: 0
            options:
                default: '0'
        delivery_fee_total:
            type: decimal
            nullable: true
            precision: 10
            scale: 0
        charge:
            type: decimal
            nullable: true
            precision: 10
            scale: 0
        tax:
            type: decimal
            nullable: true
            precision: 10
            scale: 0
        total:
            type: decimal
            nullable: true
            precision: 10
            scale: 0
        payment_total:
            type: decimal
            nullable: true
            precision: 10
            scale: 0
        payment_method:
            type: text
            nullable: true
        note:
            type: text
            nullable: true
        create_date:
            type: datetime
            nullable: false
        update_date:
            type: datetime
            nullable: false
        order_date:
            type: datetime
            nullable: true
        commit_date:
            type: datetime
            nullable: true
        payment_date:
            type: datetime
            nullable: true
        del_flg:
            type: smallint
            nullable: false
            unsigned: false
            options:
                default: '0'
    manyToOne:
        Customer:
            targetEntity: Eccube\Entity\Customer
            inversedBy: Orders
            joinColumn:
                name: customer_id
                referencedColumnName: customer_id
        Country:
            targetEntity: Eccube\Entity\Master\Country
            joinColumn:
                name: order_country_id
                referencedColumnName: id
        Pref:
            targetEntity: Eccube\Entity\Master\Pref
            joinColumn:
                name: order_pref
                referencedColumnName: id
        Sex:
            targetEntity: Eccube\Entity\Master\Sex
            joinColumn:
                name: order_sex
                referencedColumnName: id
        Job:
            targetEntity: Eccube\Entity\Master\Job
            joinColumn:
                name: order_job
                referencedColumnName: id
        Payment:
            targetEntity: Eccube\Entity\Payment
            joinColumn:
                name: payment_id
                referencedColumnName: payment_id
        DeviceType:
            targetEntity: Eccube\Entity\Master\DeviceType
            joinColumn:
                name: device_type_id
                referencedColumnName: id
        CustomerOrderStatus:
            targetEntity: Eccube\Entity\Master\CustomerOrderStatus
            joinColumn:
                name: status
                referencedColumnName: id
        OrderStatusColor:
            targetEntity: Eccube\Entity\Master\OrderStatusColor
            joinColumn:
                name: status
                referencedColumnName: id
        OrderStatus:
            targetEntity: Eccube\Entity\Master\OrderStatus
            joinColumn:
                name: status
                referencedColumnName: id
    oneToMany:
        OrderDetails:
            targetEntity: Eccube\Entity\OrderDetail
            mappedBy: Order
            orderBy:
                id: ASC
            cascade: ["persist"]
        Shippings:
            targetEntity: Eccube\Entity\Shipping
            mappedBy: Order
            orderBy:
                id: ASC
            cascade: ["persist"]
        MailHistories:
            targetEntity: Eccube\Entity\MailHistory
            mappedBy: Order
            orderBy:
                send_date: DESC
    lifecycleCallbacks: {  }
