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

Add support for digital listings #592

Open
yzernik opened this issue Aug 29, 2022 · 0 comments
Open

Add support for digital listings #592

yzernik opened this issue Aug 29, 2022 · 0 comments

Comments

@yzernik
Copy link
Owner

yzernik commented Aug 29, 2022

Allow people to sell digital files instead of physical goods.

  1. Add new columns to listings table:
    • bool is_digital.
    • fileforsale_id id of the file for sale.
  2. Add new table fileforsale with:
    • Blob column containing the file for sale.
    • Duration in milliseconds.
    • Maximum allowed size of the uploaded file.
    • Amount owed by seller to host the file for the duration.

When a buyer pays for an order or a listing with is_digital true, the shipped field is automatically set to true upon payment, and the buyer immediately gets access to the uploaded file.

When the duration of the fileforsale expires, the fileforsale is automatically deleted, and the listing deactivated_by_admin is set to true.

The amount owed to upload the file is determined by the:
- max allowed file size (specified by uploader)
- file upload duration (specified by uploader)
- sats per day per megabyte (admin setting)

Add another admin setting called max_uploaded_files_usage, specified in megabytes. This will disallow users to upload files when the quota would be exceeded.

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