PageRenderTime 26ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/grails-app/domain/general/TipoCliente.groovy

http://github.com/jdmr/mateo
Groovy | 29 lines | 19 code | 6 blank | 4 comment | 0 complexity | 3f776f7a894163726252cde81e2e0e64 MD5 | raw file
  1. package general
  2. /**
  3. *
  4. * @author jdmr
  5. */
  6. class TipoCliente implements java.io.Serializable {
  7. String nombre
  8. String descripcion
  9. BigDecimal margenUtilidad = new BigDecimal("0.20")
  10. Empresa empresa
  11. static belongsTo = Empresa
  12. static constraints = {
  13. nombre(blank:false, maxSize:16, unique:'empresa')
  14. descripcion(nullable:true,maxSize:128)
  15. margenUtilidad(scale:2,precision:8)
  16. }
  17. static mapping = {
  18. table 'tipos_cliente'
  19. }
  20. String toString() {
  21. nombre
  22. }
  23. }