You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Models.twig 949B

1234567891011121314151617181920
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.ComponentModel.DataAnnotations.Schema;
  5. namespace Luticate2.Auth.DataAccess.Models
  6. {
  7. public partial class {{ table.getName() }}
  8. {
  9. {% for column in table.getColumns() %}{% if (column.isSelected()) %}
  10. public {{ column.getType() }}{% if (not (column.isNotNull()) and (column.isTypeNotNull())) %}?{% endif %} {{ column.getName() }} { get; set; }
  11. {% endif %}{% endfor %}
  12. {% for fk in table.getSourceForeignKeys() %}{% if (fk.isSelected()) %}
  13. public {{ fk.getTargetTable().getName() }} {{ fk.getSourceForeignKeyName() }} { get; set; }
  14. {% endif %}{% endfor %}
  15. {% for fk in table.getTargetForeignKeys() %}{% if (fk.isSelected()) %}
  16. public ICollection<{{ fk.getSourceTable().getName() }}> {{ fk.getTargetForeignKeyName() }} { get; set; }
  17. {% endif %}{% endfor %}
  18. }
  19. }