Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

orders table colume definition? #54

Open
shellus opened this issue Jul 8, 2016 · 1 comment
Open

orders table colume definition? #54

shellus opened this issue Jul 8, 2016 · 1 comment

Comments

@shellus
Copy link

shellus commented Jul 8, 2016

Why README.md, for fields and /src/views/generators/migration.blade.php orders table definition is inconsistent? The former field more

look:

/src/views/generators/migration.blade.php:

Schema::create('orders', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('user_id')->unsigned();
            $table->string('statusCode', 32) -> comment('订单状态码');
            $table->timestamps();
            $table->foreign('user_id')
                ->references('id')
                ->on('users')
                ->onUpdate('cascade')
                ->onDelete('cascade');
            $table->foreign('statusCode')
                ->references('code')
                ->on('order_status')
                ->onUpdate('cascade');
            $table->index(['user_id', 'statusCode']);
            $table->index(['id', 'user_id', 'statusCode']);
        });

README.md

The Order model has the following main attributes:

id — Order id or order number.
user_id — Owner.
items — Items in order.
transactions — Transactions made on order.
statusCode — Status code.
count — Total amount of items in order.
totalPrice — Total price from all items in order.
totalTax — Total tax from all items in order, plus global tax set in config.
totalShipping — Total shipping from all items in order.
total — Total amount to be charged, sums total price, total tax and total shipping.
displayTotalPrice — Total price value formatted for shop display. i.e. "$9.99" instead of just "9.99".
displayTotalTax — Total tax value formatted for shop display. i.e. "$9.99" instead of just "9.99".
displayTotalShipping — Total shipping value formatted for shop display. i.e. "$9.99" instead of just "9.99".
displayTotal — Total amount value formatted for shop display. i.e. "$9.99" instead of just "9.99".
created_at — When the order record was created in the database.
updated_at — Last time when the order was updated.
@shellus
Copy link
Author

shellus commented Jul 8, 2016

@amsgames

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant