Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package pl.grooper.offer
- import pl.grooper.notification.Subscription;
- import pl.grooper.payment.*
- import pl.grooper.offer.sale.*
- class Category implements Serializable{
- String name
- Set subscriptions
- Integer specialCategory = null
- static hasMany = [subscriptions: Subscription]
- static constraints = {
- name blank: false, unique: true
- specialCategory nullable: true
- }
- def getSaleOfferCount() {
- return SaleOffer.countByCategory(this)
- }
- }
Add Comment
Please, Sign In to add comment