astrosat/django-astrosat-users

Add fields to Customer

Closed this issue · 2 comments

Checklist

  • Is this issue linked to an Epic issue?
  • Have you linked each commit to their issue e.g. First line should contain text like IssueID #123 - Update dependencies for front-end:. The important bit is the start IssueID #123, this will create a reference in the issue, to the commit.
  • Have you set Reviewers, labels and Milestone?

Is your feature request related to a problem? Please describe

There are several new fields that need to be added to the Customer model, as described in https://github.com/astrosat/orbis/issues/818

Describe the solution you'd like

add/update the following fields:

  • name: CharField(blank=False, unique=True...
  • official_name: CharField(blank=True...
  • company_type: CharField(blank=True, choices=<whatever>...
  • registered_number: CharField(blank=True...

remove the following fields:

  • title

Don't forget to consider the admin/serializers/templates/views/tests as well as the model.

And remember that b/c this is a generic app we don't need to worry about orbs or licences - that will be added in the orbis project.

@allynt Got some questions about the fields to change:

name

**currently: ** name = models.SlugField(unique=True, blank=False, null=False), I'm changing to name = models.CharField(unique=True, blank=False, null=False)

official_name

**currently: ** doesn't exist, I will add official_name = models.CharField(unique=True, blank=True, null=True), note the null option

company_type

currently: doesn't exist, I will add company_type = models.CharField(blank=True, choices=<whatever...>), should there be a max_length and any other params? Do we have a list of choices to create/plugin?

registered_number

currently: doesn't exist. You state this should be a CharField, if a number, why not an IntegerField? or is it an alpha-numeric value?

  • name - correct
  • official_name - correct
  • company_type - correct, and there should be a max_length (this is a required attribute for CharField)
  • registered_number - b/c it's not going to be a simple integer, it's going to be something like "AFDFD8789789798"